diff options
author | Guido van Rossum <guido@python.org> | 1998-09-21 14:46:00 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-09-21 14:46:00 (GMT) |
commit | 1b236768e70bcd626239eeeb18db170ae7cdf41e (patch) | |
tree | 56038ffec0db781b8993ae4b08658e145c4de537 /Modules/signalmodule.c | |
parent | 0db4c94d0943c66fc673b50738c2f781cee0b67d (diff) | |
download | cpython-1b236768e70bcd626239eeeb18db170ae7cdf41e.zip cpython-1b236768e70bcd626239eeeb18db170ae7cdf41e.tar.gz cpython-1b236768e70bcd626239eeeb18db170ae7cdf41e.tar.bz2 |
When we have siginterrupt(), use it to disable restarting interrupted
system calls.
Diffstat (limited to 'Modules/signalmodule.c')
-rw-r--r-- | Modules/signalmodule.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c index 7ebad93..b632efd 100644 --- a/Modules/signalmodule.c +++ b/Modules/signalmodule.c @@ -153,6 +153,9 @@ signal_handler(sig_num) 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; |