Message241903
Not sure if this is a bug, or just One of Those Things:
sys.exit(large_value) can wrap around if the value is too large, but this is O/S dependent.
linux (ubuntu 14.04)
$ python
Python 2.7.8 (default, Oct 20 2014, 15:05:29)
[GCC 4.9.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
--> import sys
--> sys.exit(256)
$ echo $?
0
$ python
Python 2.7.8 (default, Oct 20 2014, 15:05:29)
[GCC 4.9.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
--> import sys
--> sys.exit(257)
$ echo $?
1
M$ (Windows 7)
> python
Python 2.7...
--> import sys
--> sys.exit(65535)
> echo %errorlevel%
65535
> python
Python 2.7...
--> import sys
--> sys.exit(100000)
> echo %errorlevel%
100000
Perhaps a minor doc update that talks about return codes and why they might not be exactly what was given to Python? |
|
Date |
User |
Action |
Args |
2015-04-24 00:47:09 | ethan.furman | set | recipients:
+ ethan.furman, docs@python |
2015-04-24 00:47:09 | ethan.furman | set | messageid: <1429836429.07.0.888331603842.issue24045@psf.upfronthosting.co.za> |
2015-04-24 00:47:08 | ethan.furman | link | issue24045 messages |
2015-04-24 00:47:07 | ethan.furman | create | |
|