Skip to content
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

Fix streaming to file descriptor #945

Merged
merged 2 commits into from
Dec 13, 2024

Conversation

jscheid
Copy link
Contributor

@jscheid jscheid commented Dec 11, 2024

Don't use write(2) for writing to file descriptors, use IO::write instead just as for writing to a non-file IO.

Using write(2) means having to handle all kinds of edge cases, such as EINTR and EAGAIN/EWOULDBLOCK, and doesn't release the GVL when blocking.

Fixes #943

Don't use write(2) for writing to file descriptors, use IO::write
instead just as for writing to a non-file IO.

Using write(2) means having to handle all kinds of edge cases, such as
EINTR and EAGAIN/EWOULDBLOCK, and doesn't release the GVL when
blocking.
@ohler55
Copy link
Owner

ohler55 commented Dec 12, 2024

If you can put in a conditional for the test with open3 Id be glad to merge you fix.

@ohler55 ohler55 merged commit 43c7c9f into ohler55:develop Dec 13, 2024
60 checks passed
@jscheid jscheid deleted the 943-stream-writer-no-write-2 branch December 13, 2024 17:31
@jscheid
Copy link
Contributor Author

jscheid commented Dec 13, 2024

Thank you very much @ohler55.

@ohler55
Copy link
Owner

ohler55 commented Dec 14, 2024

Released

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

StreamWriter with subprocess - Undefined error: 0
2 participants