Unix Signal Handling
Discussions center on Unix/Linux signals like SIGKILL, SIGTERM, SIGINT, and SIGQUIT, including best practices for process termination, handling interruptions during syscalls, and alternatives like signalfd or PR_SET_PDEATHSIG.
Activity Over Time
Top Contributors
Keywords
Sample Comments
I am upset that they're using signal 9 instead of 15.
There are being implemented. There is a limitation about signal handling, it can interrupt a process during a sys call
Avoiding SIGKILL is probably a good call.
I'm more worried that there might be lots of devs that can't send a sigint!
Because your signal handler may get interrupted by another signal.
Doesn't all sigint? We do sigint for a reason.
Another signal that can't be caught is SIGSTOP
SIGUSR1 is often caught by applications for their own IPC. SIGQUIT would probably be a safer one to send, but that can also be caught and repurposed. Sending other signal types would definitely have to be opt-in to prevent unintended side effects.
SIGUSER is quite common for that. Or SIGHUP.
Doing this is more-or-less like calling a signal handler directly in a UNIX program: you're not likely to get the result you want.