[Python-bugs-list] [ python-Bugs-429361 ] popen2.Popen3.wait() exit code

noreply@sourceforge.net noreply@sourceforge.net
Fri, 06 Jul 2001 10:19:07 -0700


Bugs item #429361, was opened at 2001-06-01 09:45
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=429361&group_id=5470

>Category: Python Library
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: eXom (jkuan)
Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: popen2.Popen3.wait() exit code

Initial Comment:
I found there is no documentation for this behaviour or
is there any that I have missed out.

Why the value returned from wait() is multipled with
256 to the return code of child process?

E.g. 

a = popen2.Popen3("sh -c 'exit 0'")
a.wait( ) ---> 0

a = popen2.Popen3("sh -c 'exit 1'")
a.wait( ) ---> 256

a = popen2.Popen3("sh -c 'exit 2'")
a.wait( ) ---> 512

----------------------------------------------------------------------

>Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2001-07-06 10:19

Message:
Logged In: YES 
user_id=3066

Fixed in Doc/lib/libpopen2.tex revisions 1.14 and 1.13.6.1.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=429361&group_id=5470