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

Expose siginfo_t si_status field as Option<c_int> in siginfo::Process on SIGCHLD #165

Open
LunarLambda opened this issue Nov 13, 2024 · 0 comments · May be fixed by #166
Open

Expose siginfo_t si_status field as Option<c_int> in siginfo::Process on SIGCHLD #165

LunarLambda opened this issue Nov 13, 2024 · 0 comments · May be fixed by #166

Comments

@LunarLambda
Copy link

It's the missing piece for full SIGCHLD handling using signal-hook. We already have Origin::Chld for detecting child exit, child death, child stop, etc.

The way libc exposes siginfo_t is a bit weird, but I see that signal-hook has a bit of C code that handles the extraction, presumably so as to avoid libcs weirdness, so I think it would be reasonably straightforward.

I could make a PR for this if desired.

LunarLambda added a commit to LunarLambda/signal-hook that referenced this issue Nov 13, 2024
Problem: there is no way to get the exit status or signal of a child
process when handling SIGCHLD

Solution: expose `siginfo_t`'s `si_status` field in `Process` when
extracting info for SIGCHLD

closes vorner#165
@LunarLambda LunarLambda linked a pull request Nov 13, 2024 that will close this issue
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 a pull request may close this issue.

1 participant