Skip to content

Instantly share code, notes, and snippets.

@nakosung
Created November 27, 2013 02:15
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nakosung/7669666 to your computer and use it in GitHub Desktop.
Save nakosung/7669666 to your computer and use it in GitHub Desktop.
trap!
#!/bin/bash
function clean_up {
# Perform program exit housekeeping
rm $TEMP_FILE
exit
}
trap clean_up SIGHUP SIGINT SIGTERM
while true; do
: # Do nothing
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment