Eryk Sun <eryk...@gmail.com> added the comment:

> The return code of python on linux when the program is ended with 
> a KeyboardInterrupt should be -2

In general, the exit status for an unhandled KeyboardInterrupt (i.e. 
_Py_UnhandledKeyboardInterrupt) should be the same as the default SIGINT 
handler. This is implemented by exit_sigint in Modules/main.c. In POSIX, it 
uses the actual default SIGINT handler via kill(). In Windows, it uses the exit 
status that the default console control handler would use, 
STATUS_CONTROL_C_EXIT (0xC000_013A).

----------
nosy: +eryksun

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41602>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to