Charles-François Natali <neolo...@free.fr> added the comment:

> subprocess.Popen.communicate() hangs for daemonized subprocesses that 
> leave a pipe open. [...] which leaves stderr pipe open.

Of course: the daemon process (spawned by the second fork()) inherits the 
subprocess's stderr (since file descriptors are inherited upon fork), and 
communicate waits until the subprocess's stderr and stdout are closed (EOF 
returned).
And it's of course documented, see 
http://docs.python.org/dev/library/subprocess.html#subprocess.Popen.communicate 
:
"""
Popen.communicate(input=None, timeout=None) 
Interact with process: Send data to stdin. Read data from stdout and stderr, 
until end-of-file is reached. Wait for process to terminate.
"""

----------
nosy: +neologix

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue13422>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to