Changes by David Andrzejewski site+python@davidandrzejewski.com:
--
nosy: +dandrzejewski
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2475
___
Changes by Terry J. Reedy tjre...@udel.edu:
--
resolution: - out of date
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2475
___
Terry J. Reedy tjre...@udel.edu added the comment:
Should this be closed or is this still a problem in 2.7 (release candidate out
now, final soon) or 3.1?
--
nosy: +tjreedy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2475
reiko [EMAIL PROTECTED] added the comment:
I have also run into this problem. If you only use p.poll() and never
p.wait(), returncode will always remain None.
roudkerk's workaround doesn't seem to work with the new Popen objects,
at least in python 2.4. (unexpected keyword argument
Mike Lisanke [EMAIL PROTECTED] 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
roudkerk [EMAIL PROTECTED] added the comment:
The problem is that os.wait() does not play nicely with subprocess.py.
Popen.poll() and Popen.wait() use os.waitpid(pid, ...) which will
raise OSError if pid has already been reported by os.wait().
Popen.poll() swallows OSError and by default
Josh Cogliati [EMAIL PROTECTED] added the comment:
Hm. Well, after filing the bug, I created a thread for each subprocess,
and had that thread do an wait on the process, and that worked fine.
So, I guess at minimum it sounds like the documentation for poll could
be improved to mention that it
New submission from Josh Cogliati [EMAIL PROTECTED]:
I was trying to use subprocess to run multiple processes, and then wait
until one was finished. I was using poll() to do this and created the
following test case:
#BEGIN
import subprocess,os
procs = [subprocess.Popen([sleep,str(x)]) for x in