Robert Siemer <[EMAIL PROTECTED]> added the comment: Bad design stays bad design: the hope that pids don't get reused soon breaks two assumptions: 1) I don't have to wait() for a child process soon. It's the programs business. 2) Pids cycle: there are security patches to make pids of future processes hard to predict by assigning random free pids.
I actually was about to report a bug on subprocess when I bumped into this one. My problem is pretty thread-less but related: How do I kill() a process if it's pid got recycled behind my back?? In my opinion the module should work the "Python" way of doing things, otherwise programmers will be surprised, as I was: a) don't do my work (no wait() for things I care of/have reference to) b) do your work (clean up things I don't care of/have no reference to) If that's not possible, how does subprocess actually "intends to replace os.spawn*"? [Library Reference] It is still possible to extend the Popen() call to reflect if the caller wants a P_NOWAITO or P_NOWAIT behavior, but the closer we get to the os, the less sense does it make to replace some other modules... ---------- nosy: +siemer _____________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1731717> _____________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com