Code returned by poll() method on popen2.Popne3/4 objects

Eric Brunel eric.brunel at pragmadev.com
Thu Jan 2 04:47:26 EST 2003


Hi all,

I'm playing with the poll() method on popen2.Popen4 objects and I noticed a 
little ambiguity in its documentation. It says:

"""
Returns -1 if child process hasn't completed yet, or its return code 
otherwise.
"""

but apparently, the returned value is not only the "return code" (which for 
me is the value passed to the program's call to exit(...)), but the same 
value returned by os.wait(), including the signal number that killed the 
program in the low byte and the actual return code in the high byte.

Can anyone confirm that? If it is so, IMHO, it would be better to change 
the documentation of the os module to make it clearer.

TIA
-- 
- Eric Brunel <eric.brunel at pragmadev.com> -
PragmaDev : Real Time Software Development Tools - http://www.pragmadev.com




More information about the Python-list mailing list