Just kill zombies

In case we have some alive processes this will hang, which is
not that we expect to get.
This commit is contained in:
Oleksii Shevchuk 2017-03-14 21:28:54 +02:00
parent 465d2c69ce
commit 690e3c162c
1 changed files with 4 additions and 2 deletions

View File

@ -157,8 +157,10 @@ class ReverseSlaveService(Service):
raise
try:
while True:
os.waitpid(-1, os.WNOHANG)
pid = os.waitpid(-1, os.WNOHANG)
while pid:
pid = os.waitpid(-1, os.WNOHANG)
except OSError:
pass