When I press Ctrl + C in a linux console running a Mathematica script, it doesn't stop. Instead it brings a console where I am supposed to type either
exit, or a couple other options. I think this is at odds with linux consistency and it is pretty annoying.
For example, when I write a
.sh script containing various calls to a Mathematica script, pressing
Ctrl + C won't stop the script, because Mathematica captures the
SIGINT signal, brings the annoying
Interrupt console, and whatever after I type here, the script just keeps running because it never heard the
SIGINT signal (at least that's what I think is happening).
The only way I have to kill the script is to close the terminal that spawned it, which is pretty brutal.
My question is: Why Mathematica doesn't respect
Ctrl + C signals, like most programs in Linux do? What's the design? I love Mathematica, but this particular point is not very friendly.
And on a practical side: How do I stop a shell script which calls multiple Mathematica scripts, without closing the terminal?