Message168798
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. |
|
Date |
User |
Action |
Args |
2012-08-21 19:15:18 | twhitema | set | recipients:
+ twhitema |
2012-08-21 19:15:17 | twhitema | set | messageid: <1345576517.75.0.906463701582.issue15756@psf.upfronthosting.co.za> |
2012-08-21 19:15:16 | twhitema | link | issue15756 messages |
2012-08-21 19:15:14 | twhitema | create | |
|