[issue1731717] race condition in subprocess module

2008-03-24 Thread Tom Culliton
Tom Culliton <[EMAIL PROTECTED]> added the comment: AIX, HP-UX, Solaris, 64 bit Linux, ... Even in the Linux x86 header files there's a mix of int and short. The last time I had to do the math on how long it would take the PID to cycle was probably on an AIX box and it was a ver

[issue1731717] race condition in subprocess module

2008-03-24 Thread Tom Culliton
Tom Culliton <[EMAIL PROTECTED]> added the comment: I'm not sure what the POSIX standards say on this (and MS-Windows may go it's own contrary way), but for most real systems the PID is a running count (generally 32 bit or larger today) which would have to cycle all the way

[issue1731717] race condition in subprocess module

2007-11-27 Thread Tom Culliton
Tom Culliton added the comment: Good question. The documentation I was reading was mute on the subject so I made a "reasonable" guess. Does it throw an exception instead? Guido van Rossum wrote: > Guido van Rossum added the comment: > > >> Looking at the subproce

[issue1731717] race condition in subprocess module

2007-11-27 Thread Tom Culliton
Tom Culliton added the comment: Looking at the subprocess.py code it occurred to me that it never checks if the value of self.pid returned by os.fork is -1, this would mean that later it runs waitpid with -1 as the first argument, putting it into promiscuous (wait for any process in the group

[issue1731717] race condition in subprocess module

2007-11-20 Thread Tom Culliton
Tom Culliton added the comment: This or some variant also shows up with scons (http://scons.tigris.org/issues/show_bug.cgi?id=1839) leading to some nasty intermittent build failures. Neal may remember how we addressed this for a Process class in a past life. Basically it's OK to collec