Make setNonBlockIfNeeded public and document its use.#242
Merged
eborden merged 1 commit intohaskell:masterfrom Mar 29, 2017
Merged
Make setNonBlockIfNeeded public and document its use.#242eborden merged 1 commit intohaskell:masterfrom
eborden merged 1 commit intohaskell:masterfrom
Conversation
Contributor
Author
|
@kazu-yamamoto , could you review this PR? It documents an issue that can hang the RTS. |
Collaborator
|
LGTM. @eborden Would you merge this PR. I'm now on vacation. |
Contributor
Author
|
Thanks Kazu, sorry for interrupting. Enjoy your vacation! |
Collaborator
|
LGTM. Thanks for your contribution! |
Closed
eborden
added a commit
that referenced
this pull request
May 17, 2017
* Zero memory of `sockaddr_un` if abstract socket [#220](#220) * Improving error messages [#232](#232) * Allow non-blocking file descriptors via `setNonBlockIfNeeded` [#242](#242) * Update config.{guess,sub} to latest version [#244](#244) * Rename `my_inet_ntoa` to avoid symbol conflicts [#228](#228) * Test infrastructure improvements [#219](#219) [#217](#217) [#218](#218) * House keeping and cleanup [#238](#238) [#237](#237)
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Making a socket out of a file descriptor may cause the RTS to hang when the fd blocks, so we need to use
setNonBlockIfNeededwhen using file descriptors that were not created by thenetworklibrary (which is an otherwise supported use case)This PR contains the export and the extra documentation.
Note that it is possible to make
networkmore robust against this situation by adding the call tomkSocket, but that will introduce unnecessary system calls in almost all situations. Haskell has been doing pretty well without that extra safety. (famous last words)