Re:Should you be scared of Unix signals?
by gpderetta on Tuesday June 14, 2016 @07:08AM
(#11901159)
The big problem with unix signals is that they have been abused to deliver some messages that should really be delivered via a message pipe (e.g. SIGCHD, all the terminal/tty specific signals). The other is that the set of signals is limited and signal handlers are a process (or thread) wide resource, so it is hard to make use of them in a library.
Other than that, the general ability of interrupting and delivering a message to a thread no matter what is doing is necessary and signals are a way to implement that. Exceptions are another way, but that can be implemented on top of signals.
edit: but there is really no excuse for EINTR. The "Worse is Better" essay has something to say about this.
Other than that, the general ability of interrupting and delivering a message to a thread no matter what is doing is necessary and signals are a way to implement that. Exceptions are another way, but that can be implemented on top of signals.
edit: but there is really no excuse for EINTR. The "Worse is Better" essay has something to say about this.