2 ms·
Writing good SIGINT handler is a bit tricky. You should re-raise the signal, so that bash notices that the program was actually interrupted: https://www.cons.o
by jwilk 6y ago
Writing good SIGINT handler is a bit tricky. You should re-raise the signal, so that bash notices that the program was actually interrupted:
https://www.cons.org/cracauer/sigint.html https://www.cons.org/cracauer/sigint.html (section "How to be a proper program")
Most of the time, especially for short lived script, adding signal handlers is not worth the trouble.