Signal Trapping Using VariablesPublished on 30 Nov 2007
You can easily catch signals thrown at your process and set variables accordingly:
trap "TEST=blah" HUP
echo -n $TEST
Feedback is always welcome! If you'd like to get in touch with me concerning the contents of this article, please use Twitter.