os.system return value left shifted 8 bits?

Steve Kirsch (stk@infoseek.com)
Wed, 27 Apr 1994 23:49:42 -0700

I was playing with os.system and noticed that it returns 256
when /bin/sh returns 1, and it returns 512 when sh returns 2.

Is python shifting left 8 bits?

I'd be pretty surprised if python is returning the right values.

Example:
os.system('grep foo /dev/null') returns 256

whereas the shell (and the man page) agree that the value is 1.

-steve