Implement waitpid and wait4 syscalls#3149
Merged
sporksmith merged 18 commits intoshadow:mainfrom Sep 7, 2023
Merged
Conversation
stevenengler
reviewed
Sep 6, 2023
Contributor
stevenengler
left a comment
There was a problem hiding this comment.
Still looking through it, I plan to continue tomorrow morning so just leaving these now.
stevenengler
approved these changes
Sep 7, 2023
Contributor
There was a problem hiding this comment.
Looks good to me! I do think it would be good to use the rust event source object if possible rather than introduce new uses of the status listener since it will be really nice to get rid of the status listener eventually, but I don't think it needs to hold up this PR.
For child events there is no object pointer. In some sense it's implicitly the Process pointer, but I don't think it's worth redundantly storing it as the syscall object pointer.
We need this in `wait4` etc to reap child processes.
We need this to iterate over child processes. It's a wider interface than ideal, but I think not worth the boilerplate that'd be needed for a more specialized interface.
We need to propagate this information in the responses to `wait4` and `waitid` syscalls.
(They'll only *actually* be reaped when using `__WCLONE` or `__WALL` with `wait4` or `waitid`)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2989