3 ms·
That's a bit misleading without mentioning all the mess that comes with signals. Threads are a problem. Reentrancy is a problem, so you can't just call printf
by dale_glass 3y ago
That's a bit misleading without mentioning all the mess that comes with signals.
Threads are a problem. Reentrancy is a problem, so you can't just call printf from your signal handler. Libraries are a problem, independent users of signals will easily step on each other's toes. There's a lack of general purpose signals, which compounds the problem. Signals are inherited when forking. Signals are not queued and therefore can be lost.
Signals carry no data, so they can't tell the program "This specific pipe closed", you have to figure out yourself which specific thing the signal is relevant to.
I'm probably forgetting more stuff.
TL;DR: Signals are a pain in the butt and IMO undesirable to use under most modern circumstances. If you have something better you can use, you probably should. It would be nice to have kdbus or something similar with more functionality, and less footguns.