From: Christian Heimes Date: Sat, 23 Jul 2022 10:29:00 +0000 (+0200) Subject: gh-90473: Check for HAVE_KILL in main.c:exit_sigint (GH-95165) X-Git-Tag: v3.12.0a1~873 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d291a82df33cd8c917a374fef2a2373beda78b77;p=thirdparty%2FPython%2Fcpython.git gh-90473: Check for HAVE_KILL in main.c:exit_sigint (GH-95165) --- diff --git a/Modules/main.c b/Modules/main.c index 90f237293b85..aa523fc58d93 100644 --- a/Modules/main.c +++ b/Modules/main.c @@ -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 {