mirror of
https://github.com/containers/podman.git
synced 2025-10-17 03:04:21 +08:00
libpod: shutdown Stop waits for handlers completion
wait for handlers currently being processed. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
@ -91,6 +91,11 @@ func Stop() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// if the signal handler is running, wait that it terminates
|
||||
handlerLock.Lock()
|
||||
defer handlerLock.Unlock()
|
||||
// it doesn't need to be in the critical section, but staticcheck complains if
|
||||
// the critical section is empty.
|
||||
cancelChan <- true
|
||||
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user