os.wait() losing child?

Jason Zheng Xin.Zheng at jpl.nasa.gov
Fri Jul 13 10:40:32 EDT 2007


Hrvoje Niksic wrote:
> Jason Zheng <Xin.Zheng at jpl.nasa.gov> writes:
> 
>> Hrvoje Niksic wrote:
>>>> greg wrote:
>>> Actually, it's not that bad.  _cleanup only polls the instances that
>>> are no longer referenced by user code, but still running.  If you hang
>>> on to Popen instances, they won't be added to _active, and __init__
>>> won't reap them (_active is only populated from Popen.__del__).
>>>
>> Perhaps that's the difference between Python 2.4 and 2.5.
> [...]
>> Nope it still doesn't work. I'm running python 2.4.4, tho.
> 
> That explains it, then, and also why greg's code didn't work.  You
> still have the option to try to run 2.5's subprocess.py under 2.4.
Is it more convenient to just inherit the Popen class? I'm concerned 
about portability of my code. It will be run on multiple machines with 
mixed Python 2.4 and 2.5 environments.



More information about the Python-list mailing list