Skip to content

Commit f15be2f

Browse files
gh-90473: Check for HAVE_KILL in main.c:exit_sigint (GH-95165)
(cherry picked from commit d291a82) Co-authored-by: Christian Heimes <christian@python.org>
1 parent 0d688bd commit f15be2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/main.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ exit_sigint(void)
640640
* SIG_DFL handler for SIGINT if KeyboardInterrupt went unhandled.
641641
* If we don't, a calling process such as a shell may not know
642642
* about the user's ^C. https://www.cons.org/cracauer/sigint.html */
643-
#if defined(HAVE_GETPID) && !defined(MS_WINDOWS)
643+
#if defined(HAVE_GETPID) && defined(HAVE_KILL) && !defined(MS_WINDOWS)
644644
if (PyOS_setsig(SIGINT, SIG_DFL) == SIG_ERR) {
645645
perror("signal"); /* Impossible in normal environments. */
646646
} else {

0 commit comments

Comments
 (0)