From 1b236768e70bcd626239eeeb18db170ae7cdf41e Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Mon, 21 Sep 1998 14:46:00 +0000 Subject: [PATCH] When we have siginterrupt(), use it to disable restarting interrupted system calls. --- Modules/signalmodule.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c index 7ebad93efe6..b632efd1b37 100644 --- a/Modules/signalmodule.c +++ b/Modules/signalmodule.c @@ -152,6 +152,9 @@ signal_handler(sig_num) to the Python handler... */ return; } +#endif +#ifdef HAVE_SIGINTERRUPT + siginterrupt(sig_num, 1); #endif (void)signal(sig_num, &signal_handler); } @@ -240,6 +243,9 @@ signal_signal(self, args) } else func = signal_handler; +#ifdef HAVE_SIGINTERRUPT + siginterrupt(sig_num, 1); +#endif if (signal(sig_num, func) == SIG_ERR) { PyErr_SetFromErrno(PyExc_RuntimeError); return NULL;