mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
gh-90473: Check for HAVE_KILL in main.c:exit_sigint (GH-95165)
(cherry picked from commit d291a82df3
)
Co-authored-by: Christian Heimes <christian@python.org>
This commit is contained in:
parent
0d688bd2b6
commit
f15be2fad1
1 changed files with 1 additions and 1 deletions
|
@ -640,7 +640,7 @@ exit_sigint(void)
|
|||
* SIG_DFL handler for SIGINT if KeyboardInterrupt went unhandled.
|
||||
* If we don't, a calling process such as a shell may not know
|
||||
* about the user's ^C. https://www.cons.org/cracauer/sigint.html */
|
||||
#if defined(HAVE_GETPID) && !defined(MS_WINDOWS)
|
||||
#if defined(HAVE_GETPID) && defined(HAVE_KILL) && !defined(MS_WINDOWS)
|
||||
if (PyOS_setsig(SIGINT, SIG_DFL) == SIG_ERR) {
|
||||
perror("signal"); /* Impossible in normal environments. */
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue