gh-90473: Check for HAVE_KILL in main.c:exit_sigint (GH-95165)

This commit is contained in:
Christian Heimes 2022-07-23 12:29:00 +02:00 committed by GitHub
parent 6839324894
commit d291a82df3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -649,7 +649,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 {