Closed harto closed 10 years ago
The abnormally large exit code value (10752
) is ignored by sys.exit
:
$ python -c 'import sys; sys.exit(10752)'; echo $?
0
Probably because, according to http://docs.python.org/2/library/sys.html#sys.exit:
Most systems require [the exit code] to be in the range 0-127, and produce undefined results otherwise.
Can you test this?
Looks good to me:
# Previous version:
root@e63c58ccd0ef:/# /sbin/my_init --skip-runit --quiet -- bash -c 'exit 42'; echo $?
0
# Current master:
root@e63c58ccd0ef:/# /baseimage-docker/image/my_init --skip-runit --quiet -- bash -c 'exit 42'; echo $?
42
Awesome, thanks! :-)
Unless I'm misunderstanding something, the final line of this output should read
42
: