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 crash when Process.wait is used #895

Merged
merged 4 commits into from
Nov 12, 2019
Merged

Conversation

asBrettisay
Copy link
Contributor

Make sys_command tolerate a missing $CHILD_STATUS.

Hi 👋 in my code I was using Process.wait and found that it was causing this error in sentry-raven: undefined method exitstatus' for nil:NilClass`

My understanding is that calling Process.wait clears out the ruby global for last child process, and this is causing the error. I think that sentry-raven should be able to work if I use Process.wait or something similar like `trap('CLD', 'IGNORE') so I made a PR that I think will fix the issue. Hope that this helps 👍.

Make `sys_command` compatible with `Process.wait` and `trap('CLD', 'IGNORE')`
@asBrettisay asBrettisay changed the title Update base.rb Fix crash when Process.wait is used Apr 11, 2019
@dennis-ef
Copy link

Can this please be implemented. It's also fixing crashes for me. It was difficult to figure out what was the problem until I found this PR. Thank you.

@asBrettisay
Copy link
Contributor Author

@HazAT can we see if this will work?

Copy link
Member

@HazAT HazAT left a comment

Choose a reason for hiding this comment

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

Thx! 🎉
Will do a release on monday!

@HazAT
Copy link
Member

HazAT commented Nov 8, 2019

Oh, @asBrettisay Can you please fix the tests before merging?
Thx

@asBrettisay
Copy link
Contributor Author

@HazAT Will do

@asBrettisay
Copy link
Contributor Author

@HazAT Tests are passing

Copy link
Member

@HazAT HazAT left a comment

Choose a reason for hiding this comment

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

Thank you again 🎉

@HazAT HazAT merged commit 302ca39 into getsentry:master Nov 12, 2019
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.

3 participants