Alexander Belopolsky added the comment: > The value of exit returned to the parent should be status & 0377.
Apparently, this is not so on Windows. See msg241903 in #24045. POSIX defines [1] exit to return status & 0377, but that does not mean that sys.exit(256) must return 0 without a warning. It is very unlikely that someone would intentionally use code=256 to signify success. It is much more likely that sys.exit(256) is a result of a programming error. I believe a better behavior for sys.exit() would be to truncate the code values to 8-bit range so that non-zero status would always be returned as non-zero, but possibly different value. [1] http://pubs.opengroup.org/onlinepubs/009695399/functions/exit.html ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue24052> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com