mirror of
https://github.com/containers/podman.git
synced 2025-10-18 11:42:55 +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
|
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
|
cancelChan <- true
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
Reference in New Issue
Block a user