This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2012年08月21日 19:15 by twhitema, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| issue15756_poll_v1.patch | twhitema, 2012年08月21日 19:20 | review | ||
| Messages (5) | |||
|---|---|---|---|
| msg168798 - (view) | Author: Todd Whiteman (twhitema) | Date: 2012年08月21日 19:15 | |
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. |
|||
| msg168799 - (view) | Author: Todd Whiteman (twhitema) | Date: 2012年08月21日 19:20 | |
The attached patch handles errno.ECHILD in the _internal_poll() method and I've updated the existing "sigchild_ignore.py" test file to perform polling as well. An unpatched version of Pyhton would normally hang on this particular test, whilst the patched version will run successfully. |
|||
| msg169581 - (view) | Author: Gregory P. Smith (gregory.p.smith) * (Python committer) | Date: 2012年08月31日 20:38 | |
thanks! I'll take care of getting this fix in. |
|||
| msg171588 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年09月29日 18:58 | |
New changeset 484c50bf445c by Gregory P. Smith in branch '3.2': Fixes issue #15756: subprocess.poll() now properly handles errno.ECHILD http://hg.python.org/cpython/rev/484c50bf445c New changeset ba8d85552e34 by Gregory P. Smith in branch '3.3': Fixes issue #15756: subprocess.poll() now properly handles errno.ECHILD http://hg.python.org/cpython/rev/ba8d85552e34 New changeset 9032b3f52819 by Gregory P. Smith in branch 'default': Fixes issue #15756: subprocess.poll() now properly handles errno.ECHILD to http://hg.python.org/cpython/rev/9032b3f52819 |
|||
| msg171589 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年09月29日 19:03 | |
New changeset 53e91fa35f8e by Gregory P. Smith in branch '2.7': Issue #15756: subprocess.poll() now properly handles errno.ECHILD to http://hg.python.org/cpython/rev/53e91fa35f8e |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:35 | admin | set | github: 59960 |
| 2012年09月29日 19:03:53 | gregory.p.smith | set | status: open -> closed resolution: fixed |
| 2012年09月29日 19:03:25 | python-dev | set | messages: + msg171589 |
| 2012年09月29日 18:58:44 | python-dev | set | nosy:
+ python-dev messages: + msg171588 |
| 2012年09月10日 02:12:51 | jcea | set | nosy:
+ jcea |
| 2012年08月31日 20:38:34 | gregory.p.smith | set | assignee: gregory.p.smith messages: + msg169581 |
| 2012年08月31日 19:31:00 | berker.peksag | set | versions: - Python 2.6, Python 3.1 |
| 2012年08月25日 08:49:05 | tshepang | set | nosy:
+ tshepang |
| 2012年08月21日 19:20:36 | twhitema | set | files:
+ issue15756_poll_v1.patch keywords: + patch messages: + msg168799 |
| 2012年08月21日 19:15:33 | twhitema | set | nosy:
+ gregory.p.smith |
| 2012年08月21日 19:15:17 | twhitema | create | |