How can I test that the bash interactive shell handles the signal using the handler that I set up via `trap`?
Clash Royale CLAN TAG #URR8PPP up vote 0 down vote favorite In a bash interactive shell, when I run a trap command (e.g. trap "echo You hit control-C!" INT ) to set up a signal handler, does that set up how the bash interactive shell handles the signal? How can I test that the bash interactive shell handles the signal by using the handler that I set up via trap ? Is it possible to test i.e. to generate the signal within the bash interactive shell? within the terminal emulator where the shell runs? Or must I test from the outside of the bash interactive shell, or outside the terminal emulator? Thanks. bash signals trap share | improve this question asked Oct 19 '17 at 22:44 Tim 22.9k 66 225 407 What do you expect to happen, and what's happening instead? The definition of trap is "The commands in arg are to be read and executed when the shell receives signal sigspec." â Jeff Schaller Oct 19 '17 at 23:...