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 fileutils.c #67882
Comments
fileutils.c must be modified to retry when a function fails with EINTR: see the PEP-475. I'm working on a patch. |
New changeset 0b99d7043a99 by Victor Stinner in branch 'default': |
New changeset cfe541c694f3 by Victor Stinner in branch 'default': |
fileutils_eintr.patch: handle EINTR for open, fopen and dup (only on Linux for dup in _Py_dup). _Py_wfopen() and _Py_fopen() are not modified because callers are not really prepared to handle exceptions. These functions are mostly used during early steps of Python initializations. If someone is motived, you can propose a patch for these functions. For other functions (cwd, readlink, etc.), it's not clear to me if we can get EINTR or not. |
LGTM. Note that dup() cannot fail with EINTR, it is non-blocking: dup2() can See e.g. this man page from my Debian: |
Charles-François Natali added the comment:
Oh right, I misread the manual page. I will leave _Py_dup() unchanged. |
All functions which can fail with EINTR now retries the function on EINTR. I close the issue. |
New changeset ed25e945cdc2 by Victor Stinner in branch 'default': |
New changeset 2e1234208bab 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: