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

rescue IO::EAGAINWaitReadable errors #252

Merged
merged 3 commits into from
Feb 7, 2023
Merged

rescue IO::EAGAINWaitReadable errors #252

merged 3 commits into from
Feb 7, 2023

Conversation

dlpierce
Copy link
Member

@dlpierce dlpierce commented Feb 2, 2023

Fixes #251

Adds handling of IO::WaitReadable errors (such as IO::EAGAINWaitReadable) in the manner suggested by IO#read_nonblock documentation. The existing use of IO.select appears able to fail when only one of stdout or stderr is ready. Each file will now be retried if the read is not ready.

@dlpierce dlpierce mentioned this pull request Feb 2, 2023
@cjcolvar cjcolvar mentioned this pull request Feb 3, 2023
Adds handling of IO::WaitReadable errors (such as IO::EAGAINWaitReadable) in the manner suggested by IO#read_nonblock documentation. The existing use of IO.select appears able to fail when only one of stdout or stderr is ready. Each file will now be retried if the read is not ready.
Copy link
Member

@cjcolvar cjcolvar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, but would you be able to add a test case for this?

Copy link
Member

@cjcolvar cjcolvar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Looks good!

@cjcolvar cjcolvar merged commit 607c724 into main Feb 7, 2023
@cjcolvar cjcolvar deleted the WaitReadable branch February 7, 2023 14:47
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.

IO::EAGAINWaitReadable error in ShellBasedProcessor
2 participants