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

miss-islington webhook-mailer at python.org
Sat Jul 23 07:09:16 EDT 2022


https://github.com/python/cpython/commit/f15be2fad115ebe1cafc6fa372cc517ba7065ecf
commit: f15be2fad115ebe1cafc6fa372cc517ba7065ecf
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2022年07月23日T04:09:10-07:00
summary:
gh-90473: Check for HAVE_KILL in main.c:exit_sigint (GH-95165)
(cherry picked from commit d291a82df33cd8c917a374fef2a2373beda78b77)
Co-authored-by: Christian Heimes <christian at python.org>
files:
M Modules/main.c
diff --git a/Modules/main.c b/Modules/main.c
index cca669bdbf4b8..6904e3f76e891 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 {


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /