Resetting signals

If we want to reset the signal behavior to the original default action, then we need to call the trap command followed by the signal name or number as shown in the following examples, respectively:

    $ trap TSTP
    $ trap 20

This will reset the default action of signal 20 (SIGTSTP). The default action is to suspend the process (Ctrl + Z).

Get Learning Linux Shell Scripting - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.