Be nice and die well
20 Nov 2012It’s a morbid title, I agree but it is quite important. Unix daemons really need to listen to the messages (read as: signals) being sent to them and responding correctly. At the very least, if every daemon implemented the following it’d be a breath of fresh air:
This block of code by itself is pretty useless. The other half of the equation is attaching this function to the signals of interest as well as ignoring signals we’re not interested in (or that we’re not interested in those signals turning our daemon to toast).
Well, that’s it really and remember - die well.