Re:Two simple tricks for better shell script error handling
by liraz on Monday April 05, 2010 @09:52AM
(#1241886)
I haven't run into any problems (yet) obstructing signal propagation in my scripts but as you point out it's not The Correct Thing To Do. For the sake of correctness I'll be updating my error handling code. I find doing the correct thing often saves me from debugging strange edge cases.
(replied to on blog comments as well)
If you decide to trap INT or TERM, it would be wise to properly kill your process with INT or TERM:
Not propagating signals in this manner is being a bad Unix citizen. Bash would have re-raised the SIGNAL, so you should too.For more information: http://www.cons.org/cracauer/sigint.html