From: Peter Astrand Date: Sat, 1 Jan 2005 09:38:57 +0000 (+0000) Subject: On UNIX, when the execution of the child fails, we must waitpid() to X-Git-Tag: v2.5a0~2192 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f791d7a278fed1ff3b12bce5c984e4dc907bca62;p=python On UNIX, when the execution of the child fails, we must waitpid() to prevent leaving zombies. --- diff --git a/Lib/subprocess.py b/Lib/subprocess.py index da0c31b6c9..5d0c5e668e 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -1023,6 +1023,7 @@ class Popen(object): data = os.read(errpipe_read, 1048576) # Exceptions limited to 1 MB os.close(errpipe_read) if data != "": + os.waitpid(self.pid, 0) child_exception = pickle.loads(data) raise child_exception