theunixtips.com
bash : Signal Handling
Bash provides “trap” function to trap signals and define handlers.