5 ms·
For once, Betteridge's Law of Headlines doesn't hold. Signals suck and are best avoided. When handling the concept in a vacuum, like writing a simple program f
by dale_glass 3y ago
For once, Betteridge's Law of Headlines doesn't hold. Signals suck and are best avoided.
When handling the concept in a vacuum, like writing a simple program from scratch that uses them, sure, they're usable.
But add threads, libraries, and complex code and it quickly risks becoming a huge pain. It's one of those things from UNIX that are in principle not that bad of an idea, but just never grew up with the times.
- bluetomcat 3y agoIt’s a mess that originates from the notion that terminals must be able to control and interrupt processes started from a shell. Events from the terminal are translated to SIGxxxx and acted upon by well-behaving programs. Had there been no terminals from the beginning, we would probably have a different abstraction for interrupting processes.
- pjc50 3y agoThere's also the signals that can originate from "within", like SIGILL, the SIGPIPE for interrupting otherwise blocking IO, and SIGCHILD for subprocess management.
- deleted 3y ago[deleted]