This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eryksun
Recipients eryksun, graingert, gregory.p.smith, gvanrossum, ncoghlan
Date 2020-09-16.19:36:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1600285004.21.0.645516836652.issue41602@roundup.psfhosted.org>
In-reply-to
Content
> 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).
History
Date User Action Args
2020-09-16 19:36:44eryksunsetrecipients: + eryksun, gvanrossum, gregory.p.smith, ncoghlan, graingert
2020-09-16 19:36:44eryksunsetmessageid: <1600285004.21.0.645516836652.issue41602@roundup.psfhosted.org>
2020-09-16 19:36:44eryksunlinkissue41602 messages
2020-09-16 19:36:44eryksuncreate