From 690e3c162cfd1637b2643357382a46ea827532d6 Mon Sep 17 00:00:00 2001 From: Oleksii Shevchuk Date: Tue, 14 Mar 2017 21:28:54 +0200 Subject: [PATCH] Just kill zombies In case we have some alive processes this will hang, which is not that we expect to get. --- pupy/pp.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pupy/pp.py b/pupy/pp.py index 96586a79..01686c3b 100755 --- a/pupy/pp.py +++ b/pupy/pp.py @@ -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