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 #116 - zombie processes with posix driver #117

Closed
wants to merge 1 commit into from

Conversation

tchaloupka
Copy link

waitpid must be called to avoid zombie processes.
See http://man7.org/linux/man-pages/man2/waitpid.2.html

@tchaloupka
Copy link
Author

Another solution can be SA_NOCLDWAIT used with sigaction, but as we want to handle only known child processes, explicit call to waitpid seems more correct.

@tchaloupka
Copy link
Author

CI errors seems unrelated

Copy link

@PetarKirov PetarKirov left a comment

Choose a reason for hiding this comment

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

Looks good to me. Is is possible to add a test?

@s-ludwig
Copy link
Member

Needs to be rebased to account for the change in #114. I also think that in addition to calling waitpid, it also has to be used to control the loop within onSignal, because multiple signals can result in just a single signalfd_siginfo being reported by read. For that to work, waitpid would be called with a pid argument of -1 and then returns the exited PID, if any.

@tchaloupka
Copy link
Author

Superseded by #122

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