Execute commands if any of signals is received. Each signal can be a signal name or number. Common signals include 0, 1, 2, and 15. Multiple commands should be quoted as a group and separated by semicolons internally. If commands is the null string (e.g., trap “” signals), then signals is ignored by the shell. If commands is omitted entirely, reset processing of specified signals to the default action. If both commands and signals are omitted, list current trap assignments. See examples at the end of this entry and under exec.
List signal names and numbers.
Used with no commands to print the trap commands associated with each signal, or all signals if none is specified.
Signals are listed along with what triggers them.
Exit from shell (usually when shell script finishes).
Hang up (usually logout).
Interrupt (usually through Ctrl-C).
Reference to invalid memory.
Write to a pipe without a process to read it.
Software termination (usually via kill).
Termination of child process.
Continue (if stopped).
Process suspended (usually through Ctrl-Z).
Background process has tty input.
Background process has tty output.
I/O possible on a channel.
trap "" 2Ignore signal 2 (interrupts) ...