diff Lib/subprocess.py @ 34301:1f7cf8521bb5 2.4

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:32:16 +0000
parents 05f8a4fec356
children 4abf21be17d3
line wrap: on
line diff
--- a/Lib/subprocess.py	Sat Jan 01 07:52:40 2005 +0000
+++ b/Lib/subprocess.py	Sat Jan 01 09:32:16 2005 +0000
@@ -985,6 +985,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