Neal Norwitz wrote:
> I played with this some last night and found the same ordering.  I
> have a different patch that also fixes the problem.  It also fixes 2-3
> bugs I think.  Basically the child could be waited on from outside
> popen (or from 2 threads).  The question is what should we do if that
> happens?

As discussed in the patch: If the application calls wait() at some 
point, or poll() (in the same thread or a different thread), then it
is correct if .wait() will raise an os.error (ECHILD) - the pid was
already waited on.

OTOH, _cleanup shouldn't mess with pids that the application still might 
want to wait on; _cleanup should also clean out objects that already
have been waited on. So my proposal is that Popen3 objects should be
added to _active only in __del__.

Regards,
Martin
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to