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.