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

Check the retval of waitpid before errno #6489

Merged
merged 1 commit into from Dec 14, 2020

Conversation

headius
Copy link
Member

@headius headius commented Dec 11, 2020

As described in #6477 it appears that a successful waitpid under
some circumstances is leaving errno set, either to 11 (EAGAIN) or
in some situation 2 (ENOENT). The reasons for this unsanitary
errno handling are not clear, but the logic in JRuby should at
least be checking for a -1 retval before assuming there was an
error. This commit makes that modification which should avoid the
error reported in #6477.

This constitutes a "fix" of sorts, but we still don't know why the
cicumstances in #6477 lead to this errno result.

Fixes #6477.

As described in jruby#6477 it appears that a successful waitpid under
some circumstances is leaving errno set, either to 11 (EAGAIN) or
in some situation 2 (ENOENT). The reasons for this unsanitary
errno handling are not clear, but the logic in JRuby should at
least be checking for a -1 retval before assuming there was an
error. This commit makes that modification which should avoid the
error reported in jruby#6477.

This constitutes a "fix" of sorts, but we still don't know why the
cicumstances in jruby#6477 lead to this errno result.

Fixes jruby#6477.
@headius headius added this to the JRuby 9.2.15.0 milestone Dec 11, 2020
@headius headius merged commit 1c91325 into jruby:jruby-9.2 Dec 14, 2020
@headius headius deleted the check_waitpid_retval branch December 14, 2020 21:38
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.

None yet

1 participant