Message147821
> 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.
""" |
|
Date |
User |
Action |
Args |
2011-11-17 21:00:30 | neologix | set | recipients:
+ neologix, fsteffenhagen |
2011-11-17 21:00:30 | neologix | set | messageid: <1321563630.1.0.104903323858.issue13422@psf.upfronthosting.co.za> |
2011-11-17 21:00:29 | neologix | link | issue13422 messages |
2011-11-17 21:00:29 | neologix | create | |
|