diff --git a/Lib/subprocess.py b/Lib/subprocess.py index da0c31b6c93..5d0c5e668e3 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -1023,6 +1023,7 @@ def _execute_child(self, args, executable, preexec_fn, close_fds, 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