Kaydet (Commit) e72fe399 authored tarafından Victor Stinner's avatar Victor Stinner

Issue #23836: Use _Py_write_noraise() to retry on EINTR in trip_signal() of

signalmodule.c
üst 6f4fae8a
......@@ -263,9 +263,10 @@ trip_signal(int sig_num)
#endif
{
byte = (unsigned char)sig_num;
do {
rc = write(fd, &byte, 1);
} while (rc < 0 && errno == EINTR);
/* _Py_write_noraise() retries write() if write() is interrupted by
a signal (fails with EINTR). */
rc = _Py_write_noraise(fd, &byte, 1);
if (rc < 0) {
Py_AddPendingCall(report_wakeup_write_error,
......
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