Open3 / os.waitpid() bug

Fred L. Drake, Jr. fdrake at acm.org
Thu Aug 5 22:28:17 CEST 1999


sragsdale at my-deja.com writes:
 > In both cases, we didn't get the actual return value: we got something
 > much bigger.  I ended up discovering that for return value x, Python
 > thinks the child process returned 256*x.

  That's not *just* the return code; the Unix return code is that
number >> 8 (as you note); that number & 0xff tells HOW the process
exited (by a signal, calling exit(), other).  This is discussed in the
library reference somewhere, but I don't recall exactly where.


  -Fred

--
Fred L. Drake, Jr.	     <fdrake at acm.org>
Corporation for National Research Initiatives




More information about the Python-list mailing list