I was looking into a script and I found this:
trap "rm -f $pidfile" 0 1 3 15
I was looking into a script and I found this:
trap "rm -f $pidfile" 0 1 3 15
This installs a trap handler for exit (0) and signals 1 (SIGHUP
), 3 (SIGQUIT
) and 15 (SIGTERM
) that removes a file presumably storing a process ID.
See man 3 signal
for details about signals.