New submission from Todd Whiteman: In the case of a "errno.ECHILD" exception - Python's subprocess module misses the fact that the process has already ended.
The following code will wait indefinitely, even though the launched process is quickly ended: import subprocess, signal signal.signal(signal.SIGCLD, signal.SIG_IGN) p = subprocess.Popen(['echo','foo']) while p.poll() is None: pass # wait for the process to exit Note: This is the exact same issue as issue1731717, but applying to the subprocess.poll() method instead of the subprocess.wait() method. ---------- components: Library (Lib) messages: 168798 nosy: twhitema priority: normal severity: normal status: open title: subprocess.poll() does not handle errno.ECHILD "No child processes" type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15756> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com