diff options
author | Benjamin Peterson <benjamin@python.org> | 2012-10-09 11:16:26 -0400 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2012-10-09 11:16:26 -0400 |
commit | 455fa0a314b7f7edd0c8554b12a65267ff1e2e5b (patch) | |
tree | a4db0395d8674c1e3c4119f0edccf72307b34e49 /Lib/subprocess.py | |
parent | b29614e047110f4d9af993a6cdec4e3fb7ef9738 (diff) | |
parent | 831893a68ec7114c1fc9c8e36b9159f5c1db50c7 (diff) | |
download | cpython-git-455fa0a314b7f7edd0c8554b12a65267ff1e2e5b.tar.gz |
merge heads
Diffstat (limited to 'Lib/subprocess.py')
-rw-r--r-- | Lib/subprocess.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Lib/subprocess.py b/Lib/subprocess.py index cec1a24fee..775db501a1 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -1445,9 +1445,16 @@ class Popen(object): pid, sts = _waitpid(self.pid, _WNOHANG) if pid == self.pid: self._handle_exitstatus(sts) - except _os_error: + except _os_error as e: if _deadstate is not None: self.returncode = _deadstate + elif e.errno == errno.ECHILD: + # This happens if SIGCLD is set to be ignored or + # waiting for child processes has otherwise been + # disabled for our process. This child is dead, we + # can't get the status. + # http://bugs.python.org/issue15756 + self.returncode = 0 return self.returncode |