Only catch errno.ECHILD

This commit is contained in:
Mehdi Abaakouk
2016-07-08 00:20:38 +02:00
parent bbfed3e47c
commit 3b05a04743

View File

@@ -279,8 +279,11 @@ class ServiceManager(object):
while True:
try:
os.waitpid(0, 0)
except OSError:
except OSError as e:
if e.errno == errno.ECHILD:
break
else:
raise
LOG.debug("Shutdown finish")
_logged_sys_exit(0)