0

I was looking into a script and I found this:

trap "rm -f $pidfile" 0 1 3 15
Jens
  • 69,818
  • 15
  • 125
  • 179

1 Answers1

1

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.

Jens
  • 69,818
  • 15
  • 125
  • 179