When a process is killed with a handle-able signal like SIGINT or SIGTERM but it does not handle the signal, what will be the exit code of the process?
What about for unhandle-able signals like SIGKILL?
From what I can tell, killing a process with SIGINT likely results in exit code 130, but would that vary by kernel or shell implementation?
$ cat myScript
#!/bin/bash
sleep 5
$ ./myScript
<ctrl-c here>
$ echo $?
130
I'm not sure how I would test the other signals...
$ ./myScript &
$ killall myScript
$ echo $?
0 # duh, that's the exit code of killall
$ killall -9 myScript
$ echo $?
0 # same problem