Message335488
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. |
|
Date |
User |
Action |
Args |
2019-02-14 01:24:38 | eryksun | set | recipients:
+ eryksun, mwh, loewis, gregory.p.smith, foom, pitrou, vstinner, jwilk, rnk, petri.lehtinen, martin.panter, SamB |
2019-02-14 01:24:38 | eryksun | set | messageid: <1550107478.91.0.181832796898.issue1054041@roundup.psfhosted.org> |
2019-02-14 01:24:38 | eryksun | link | issue1054041 messages |
2019-02-14 01:24:38 | eryksun | create | |
|