New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PEP 475: handle EINTR in the signal module #67903
Comments
Attached patch changes signal.sigtimedwait() to retry if sigtimedwait() failed with EINTR and the signal handler didn't raise an exception. |
It looks like signal.sigwaitinfo() can also fail with InterruptedError. It should also be modified. |
signal_eintr.py: More complete patch, modify also signal.sigwaitinfo(). -- I don't think that other signal functions need to be modified to handle EINTR. POSIX manual pages:
pause() fails with EINTR when it receives a signal, but signal.pause() doesn't raise InterruptedError in this case, it only returns None, because we expect a signal. I tested: signal.sigwait([]) doesn't fail with EINTR with a signal is received. No need to modify this function. On Linux, signal.set_wakeup_fd() doesn't fail with InterruptedError. |
New changeset 33a6e2587aad by Victor Stinner in branch 'default': |
New changeset 8f9925a02fe7 by Victor Stinner in branch 'default': |
New changeset 79aed09a9fa5 by Victor Stinner in branch 'default': |
New changeset ed8c2a4a6d3d by Victor Stinner in branch 'default': |
New changeset 35bc15fa4930 by Victor Stinner in branch 'default': |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: