Skip to content

Implement waitpid and wait4 syscalls#3149

Merged
sporksmith merged 18 commits intoshadow:mainfrom
sporksmith:wait4
Sep 7, 2023
Merged

Implement waitpid and wait4 syscalls#3149
sporksmith merged 18 commits intoshadow:mainfrom
sporksmith:wait4

Conversation

@sporksmith
Copy link
Copy Markdown
Contributor

Fixes #2989

@sporksmith sporksmith self-assigned this Sep 6, 2023
@github-actions github-actions bot added Component: Libraries Support functions like LD_PRELOAD and logging Component: Testing Unit and integration tests and frameworks Component: Main Composing the core Shadow executable labels Sep 6, 2023
Copy link
Copy Markdown
Contributor

@stevenengler stevenengler left a comment

Choose a reason for hiding this comment

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

Still looking through it, I plan to continue tomorrow morning so just leaving these now.

@stevenengler stevenengler self-requested a review September 6, 2023 21:19
Copy link
Copy Markdown
Contributor

@stevenengler stevenengler 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! 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`)
@sporksmith sporksmith merged commit 70f5e7e into shadow:main Sep 7, 2023
@sporksmith sporksmith deleted the wait4 branch September 7, 2023 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: Libraries Support functions like LD_PRELOAD and logging Component: Main Composing the core Shadow executable Component: Testing Unit and integration tests and frameworks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement wait4 (syscall for waitpid, wait)

2 participants