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 SamB, eryksun, foom, gregory.p.smith, jwilk, loewis, martin.panter, mwh, petri.lehtinen, pitrou, rnk, vstinner
Date 2019-02-14.01:24:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1550107478.91.0.181832796898.issue1054041@roundup.psfhosted.org>
In-reply-to
Content
For Windows, the default console control handler calls ExitProcess(STATUS_CONTROL_C_EXIT). If CMD is waiting on an application that exits with STATUS_CONTROL_C_EXIT, it prints "^C" to indicate the process was killed by Ctrl+C. For example:

    >>> STATUS_CONTROL_C_EXIT = 0xC000013A - 2**32
    >>> STATUS_CONTROL_C_EXIT
    -1073741510
    >>> sys.exit(STATUS_CONTROL_C_EXIT)
    ^C

    C:\>echo %errorlevel%
    -1073741510

Note that switching to SIG_DFL with raise(SIGINT) does not invoke the default console control handler in Windows. It just invokes the default raise() behavior, which is to call _exit(3). This exit status value of 3 is arbitrary and meaningless.
History
Date User Action Args
2019-02-14 01:24:38eryksunsetrecipients: + eryksun, mwh, loewis, gregory.p.smith, foom, pitrou, vstinner, jwilk, rnk, petri.lehtinen, martin.panter, SamB
2019-02-14 01:24:38eryksunsetmessageid: <1550107478.91.0.181832796898.issue1054041@roundup.psfhosted.org>
2019-02-14 01:24:38eryksunlinkissue1054041 messages
2019-02-14 01:24:38eryksuncreate