-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Fixes setting IO blocking on OpenBSD #5283
Fixes setting IO blocking on OpenBSD #5283
Conversation
Why should this be necessary? Surely this breaks the principle of least surprise. I'd love to hear from someone working on openbsd why this doesn't work. |
Do you have any insight as to why calling At least there should be a comment explaining that is necessary for OpenBSD support, ideally also stating why. |
Perhaps try to reproduce in C and ask the mailinglist. |
If I remember correctly this is only problematic in only one particular state, so perhaps my fix is too broad. I'll add some test cases and produce a more concise fix |
For reference, Ruby made a similar change because |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Let's avoid a useless syscall when O_NONBLOCK is already set/unset.
@ysbaddaden this is a fine performance optimization, but it shouldn't be necessary to run the program. |
It would be great to get some more investigation, but this is fine to merge. |
Fixes #4997
It's worth noting that this issue is what prevents the
crystal deps
command from working on OpenBSD