]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-90473: Check for HAVE_KILL in main.c:exit_sigint (GH-95165)
authorChristian Heimes <christian@python.org>
Sat, 23 Jul 2022 10:29:00 +0000 (12:29 +0200)
committerGitHub <noreply@github.com>
Sat, 23 Jul 2022 10:29:00 +0000 (12:29 +0200)
Modules/main.c

index 90f237293b8565cfbdfeaa063fbab5dca1a50fd5..aa523fc58d93fbf960fbba57a9216d5697927f47 100644 (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 {