Skip to content

Commit 4486dcd

Browse files
committed
reset _Py_UnhandledKeyboardInterrupt before calling runpy._run_module_as_main
1 parent 0b325b6 commit 4486dcd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Modules/main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ pymain_run_module(const wchar_t *modname, int set_argv0)
287287
Py_DECREF(module);
288288
return pymain_exit_err_print();
289289
}
290+
_Py_UnhandledKeyboardInterrupt = 0;
290291
result = PyObject_Call(runmodule, runargs, NULL);
291292
if (!result && PyErr_Occurred() == PyExc_KeyboardInterrupt) {
292293
_Py_UnhandledKeyboardInterrupt = 1;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy