mirror of
/repos/baseimage-docker.git
synced 2026-02-27 17:41:59 +01:00
Fix a potential hang in my_init during shutdown
Thanks to SAPikachu. Closes GH-151.
This commit is contained in:
@@ -127,7 +127,10 @@ def waitpid_reap_other_children(pid):
|
||||
status = None
|
||||
while not done:
|
||||
try:
|
||||
this_pid, status = os.waitpid(-1, 0)
|
||||
# https://github.com/phusion/baseimage-docker/issues/151#issuecomment-92660569
|
||||
this_pid, status = os.waitpid(pid, os.WNOHANG)
|
||||
if this_pid == 0:
|
||||
this_pid, status = os.waitpid(-1, 0)
|
||||
if this_pid == pid:
|
||||
done = True
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user