mirror of
https://github.com/python/cpython.git
synced 2026-05-15 08:59:27 -04:00
When we have siginterrupt(), use it to disable restarting interrupted
system calls.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user