-
Notifications
You must be signed in to change notification settings - Fork 77
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
(LTH-166) Check if waitpid was merely interrupted #305
Conversation
|
Can one of the admins verify this patch? |
|
Hi @aduitsis, Thanks for your contribution! I've changed the project of the ticket you opened to Leatherman, since the fix is being done here. Two things:
Thank you! |
|
CLA signed by all contributors. |
A signal may interrupt a system call such as waitpid, in which case it would return -1 but with errno set to EINTR. The typical solution is to run waitpid inside a while loop and continue looping while waitpid returns -1 with the errno variable is set to EINTR. This patch does exactly that. This patch fixes this particularly nasty bug: https://tickets.puppetlabs.com/browse/FACT-2019, but one could easily imagine other strange bugs (or rather, Heisenbugs!!!) occurring as a result.
Hello, Changed the name, retargeted to branch 1.4.x. Note, I took it from the master and sent it to 1.4.x, is that okay? Thanks! |
|
CLA signed by all contributors. |
|
I can confirm this issue with leatherman was breaking facter and puppet on FreeBSD with ruby 2.6. Applying this patch resolves the issue. More detail and debug output in our issue: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240566 |
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 pretty straightforward to me 👍
A signal may interrupt a system call such as waitpid, in which case it would return -1 but with errno set to EINTR. The typical solution is to run waitpid inside a while loop and continue looping while waitpid returns -1 with the errno variable is set to EINTR. This patch does exactly that.
This patch fixes this particularly nasty bug: https://tickets.puppetlabs.com/browse/FACT-2019, but one could easily imagine other strange bugs (or rather, Heisenbugs!!!) occurring as a result.