This repository was archived by the owner on May 4, 2018. It is now read-only.
Implement uv_sanitize_signal_handling().#1440
Open
ambrop72 wants to merge 1 commit intojoyent:masterfrom
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.