diff --git a/Modules/main.c b/Modules/main.c index cca669bdbf4b84988c8b67f97e335ba4adcb35ec..6904e3f76e8911ca0dbb45bb9df09fa426b759c8 100644 --- a/Modules/main.c +++ b/Modules/main.c @@ -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 {