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 2010年06月30日 15:54 by zarkdav, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (7) | |||
|---|---|---|---|
| msg108990 - (view) | Author: Benjamin Ryzman (zarkdav) | Date: 2010年06月30日 15:54 | |
http://pastie.org/1025197 Is it deemed acceptable that setting up one's own SIGCHLD handler breaks communicate()? I did not find it in the documentation. With the above workaround one can mix communicate() processes with processes spawned in the background that one's too lazy to wait for. |
|||
| msg108991 - (view) | Author: Jean-Paul Calderone (exarkun) * (Python committer) | Date: 2010年06月30日 15:56 | |
You should include all relevant issue materials here, in the Python issue tracker. This ticket will be useless as soon as pastie.org decides to forget about your paste. |
|||
| msg108992 - (view) | Author: Benjamin Ryzman (zarkdav) | Date: 2010年06月30日 15:59 | |
Content of the above pastie: Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56) [GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import signal >>> import subprocess >>> signal.signal(signal.SIGCHLD,signal.SIG_IGN) 0 >>> subprocess.Popen(["echo","blah"], stdout=subprocess.PIPE).communicate()[0] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.6/subprocess.py", line 698, in communicate self.wait() File "/usr/lib/python2.6/subprocess.py", line 1170, in wait pid, sts = _eintr_retry_call(os.waitpid, self.pid, 0) File "/usr/lib/python2.6/subprocess.py", line 465, in _eintr_retry_call return func(*args) OSError: [Errno 10] No child processes >>> oldsignal = signal.signal(signal.SIGCHLD,signal.SIG_DFL) >>> subprocess.Popen(["echo","blah"], stdout=subprocess.PIPE).communicate()[0] 'blah\n' >>> signal.signal(signal.SIGCHLD,oldsignal) 0 |
|||
| msg113187 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2010年08月07日 18:18 | |
Can you suggest a specific doc patch with new text and location? |
|||
| msg127784 - (view) | Author: Ross Lagerwall (rosslagerwall) (Python committer) | Date: 2011年02月03日 05:14 | |
This has been fixed in 2.7 and 3.2 so I think that this issue can be closed. |
|||
| msg127786 - (view) | Author: Ned Deily (ned.deily) * (Python committer) | Date: 2011年02月03日 07:55 | |
Thanks for the problem report. And thanks for noticing the fix. |
|||
| msg153368 - (view) | Author: Gregory P. Smith (gregory.p.smith) * (Python committer) | Date: 2012年02月14日 19:46 | |
fixed via http://hg.python.org/cpython/rev/767420808a62 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:03 | admin | set | github: 53373 |
| 2012年02月14日 19:46:49 | gregory.p.smith | set | nosy:
+ gregory.p.smith dependencies: + race condition in subprocess module messages: + msg153368 |
| 2011年02月03日 07:55:02 | ned.deily | set | status: open -> closed versions: + Python 2.7 nosy: + ned.deily messages: + msg127786 resolution: out of date stage: resolved |
| 2011年02月03日 05:14:39 | rosslagerwall | set | nosy:
+ rosslagerwall messages: + msg127784 |
| 2010年08月07日 18:18:17 | terry.reedy | set | nosy:
+ terry.reedy messages: + msg113187 versions: + Python 3.2, - Python 2.6 |
| 2010年06月30日 15:59:28 | zarkdav | set | messages: + msg108992 |
| 2010年06月30日 15:56:57 | exarkun | set | nosy:
+ exarkun messages: + msg108991 |
| 2010年06月30日 15:56:47 | zarkdav | set | assignee: docs@python components: + Documentation, Library (Lib) nosy: + docs@python |
| 2010年06月30日 15:54:55 | zarkdav | create | |