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
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4