Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Implement uv_sanitize_signal_handling(). #1440

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ambrop72
Copy link

On Unix, this function allows an application to set up a safe
environment with respect to signal handling, ensuring that random system
calls don't fail with EINTR.

See: saghul/pyuv#173 but ignore the misguided attempt to use signalfd.

The reason why I like this solution is that it is very general. It provides assurance that there isn't some obscure code lying around that will fail due to EINTR once in a blue moon. I am personally not interested in solutions which don't solve the problem in general.

This function is optional to use and its presence is not invasive. Its behavior is documented exactly so the programmer has a chance to see if using it is the right thing for their application. Even though it is quite simple and the programmer might as well do these things directly, having it here provides awareness of the solution and a reference implementation.

On Unix, this function allows an application to set up a safe
environment with respect to signal errors, ensuring that random system
calls don't fail with EINTR.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants