[issue2475] Popen.poll always returns None

Mike Lisanke report at bugs.python.org
Sun Jun 15 04:38:43 CEST 2008


Mike Lisanke <MikeLisanke at gmail.com> added the comment:

Isn't this a critical problem. The .poll() function serves as a means to
check the status of the process started. When it continues to report
'None' to a process which has already terminated, it creates a false
positive of a hung process. Dealing with recovery from an actual hung
process is difficult enough. Having to deal with a bad detection that
the process ran to completion on top of this, makes the use of
subprocess difficult. 

Maybe I'm miss applying the .poll() function. I'm trying to detect that
a process has hung, prior to calling .stdout.readlines(). The
readlines() will hang my python script if the process is hung. Is there
another way I should be doing this?

Thanks, 

Mike

----------
nosy: +lisanke

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue2475>
_______________________________________


More information about the Python-bugs-list mailing list