5 ms·
> Some signals will be specific threads anyway. Huh?
by jwilk 10y ago
> Some signals will be specific threads anyway.
Huh?
- peterbotond 10y agoYes, I would like more details on this also. ++huh?
- bleeep 10y agoIf I do "kill -HUP <pid>", the SIGHUP is delivered to a process. Each thread in the process has a separate mask of signals its willing to handle. One of those threads that have SIGHUP unmasked will have the signal delivered to it. If a thread dereferences a null pointer, the sigsegv is only relevant to the thread that dereffed the NULL pointer - that's the only thing that can do anything with it. It makes no sense to send that signal to another thread - it's a signal generated synchronously by the thread itself, rather than asynchronously from anywhere else.
- gpderetta 10y agoA word is probably missing: > Some signals will be specific to threads anyway. I.e. some signals are not sent to the process but to specifc threads. See 'bleep' reply for details.