From: Peter Astrand Date: Sat, 1 Jan 2005 09:32:16 +0000 (+0000) Subject: On UNIX, when the execution of the child fails, we must waitpid() to X-Git-Tag: v2.4.1c1~107 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5e59063ea95c1204dd28a5ee8c45c6bae4e80de0;p=thirdparty%2FPython%2Fcpython.git 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 9e326fbea42c..227ee0e99804 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -985,6 +985,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