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

noreply@sourceforge.net noreply@sourceforge.net
Fri, 01 Jun 2001 09:45:47 -0700


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

Category: Extension Modules
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: eXom (jkuan)
Assigned to: Nobody/Anonymous (nobody)
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

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

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