Kaydet (Commit) 1b236768 authored tarafından Guido van Rossum's avatar Guido van Rossum

When we have siginterrupt(), use it to disable restarting interrupted

system calls.
üst 0db4c94d
...@@ -152,6 +152,9 @@ signal_handler(sig_num) ...@@ -152,6 +152,9 @@ signal_handler(sig_num)
to the Python handler... */ to the Python handler... */
return; return;
} }
#endif
#ifdef HAVE_SIGINTERRUPT
siginterrupt(sig_num, 1);
#endif #endif
(void)signal(sig_num, &signal_handler); (void)signal(sig_num, &signal_handler);
} }
...@@ -240,6 +243,9 @@ signal_signal(self, args) ...@@ -240,6 +243,9 @@ signal_signal(self, args)
} }
else else
func = signal_handler; func = signal_handler;
#ifdef HAVE_SIGINTERRUPT
siginterrupt(sig_num, 1);
#endif
if (signal(sig_num, func) == SIG_ERR) { if (signal(sig_num, func) == SIG_ERR) {
PyErr_SetFromErrno(PyExc_RuntimeError); PyErr_SetFromErrno(PyExc_RuntimeError);
return NULL; return NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment