diff Lib/subprocess.py @ 34303:cb30cfcb39e7 legacy-trunk

On UNIX, when the execution of the child fails, we must waitpid() to prevent leaving zombies.
author Peter Astrand <astrand@lysator.liu.se>
date Sat, 01 Jan 2005 09:38:57 +0000
parents 998fb1e1c8e9
children 028f92e44b48
line wrap: on
line diff
--- a/Lib/subprocess.py	Sat Jan 01 09:36:35 2005 +0000
+++ b/Lib/subprocess.py	Sat Jan 01 09:38:57 2005 +0000
@@ -1023,6 +1023,7 @@
             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