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

Access signalfd_siginfo from signal handler #99

Open
BenjaminSchaaf opened this issue Jan 5, 2019 · 1 comment
Open

Access signalfd_siginfo from signal handler #99

BenjaminSchaaf opened this issue Jan 5, 2019 · 1 comment

Comments

@BenjaminSchaaf
Copy link
Contributor

BenjaminSchaaf commented Jan 5, 2019

Posix signal handlers come with a lot of useful information, but the only thing currently made available is the signal that was raised. I'm currently dealing with processes and using SIGCHLD to catch when a process has terminated, but I can't get the process ID from the signal handler through the current api.

A quick fix would be just replacing the int with a signalfd_siginfo in the callback, but I'm not sure how that fits with the current design philosophy. Can't test but it shouldn't break Windows builds considering signals aren't implemented there.

@s-ludwig
Copy link
Member

Just adding a comment regarding SIGCHLD - the actual information is not very useful due to signal coalescing. The porposed fix uses waitpid instead to get the status: #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

No branches or pull requests

2 participants