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.

Author neologix
Recipients fsteffenhagen, neologix
Date 2011-11-17.21:00:29
SpamBayes Score 0.00024957015
Marked as misclassified No
Message-id <1321563630.1.0.104903323858.issue13422@psf.upfronthosting.co.za>
In-reply-to
Content
> 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.
"""
History
Date User Action Args
2011-11-17 21:00:30neologixsetrecipients: + neologix, fsteffenhagen
2011-11-17 21:00:30neologixsetmessageid: <1321563630.1.0.104903323858.issue13422@psf.upfronthosting.co.za>
2011-11-17 21:00:29neologixlinkissue13422 messages
2011-11-17 21:00:29neologixcreate