I have a doubt on this question: how the signal handler sigterm is called during pselect syscall?
Asked
Active
Viewed 33 times
0
-
In the [answer](https://stackoverflow.com/a/6962573/2505965), `pselect` atomically re-installs the original signal mask, thus *unblocking* the delivery of `SIGTERM` for its duration. The Linux manual for [`pselect(2)`](https://linux.die.net/man/2/pselect) has a clear description of this behaviour. This does not mean the signal handler *is* called, necessarily, just that it *can be* (in which case `pselect` would also be interrupted). – Oka Aug 29 '23 at 12:23
-
@Oka how can I force the signal handler to be called? – Harmonia Aug 29 '23 at 13:18
-
You signal the process: [`kill(1)`](https://man7.org/linux/man-pages/man1/kill.1.html), [`kill(2)`](https://man7.org/linux/man-pages/man2/kill.2.html), [`raise(3)`](https://man7.org/linux/man-pages/man3/raise.3.html), etc. Read [`signal(7)`](https://man7.org/linux/man-pages/man7/signal.7.html) for an overview. – Oka Aug 29 '23 at 16:11
-
Note that, as is, this question relies too much on the [linked content](https://stackoverflow.com/q/6962150/2505965) to give it context, and does not exactly stand on its own as a complete (or overly clear) topic. Please try to elaborate on your issue, with examples where possible, for a better chance at a complete answer. – Oka Aug 29 '23 at 16:19