Next, we execute the test case, wherein the SA_NODEFER flag is set (first ensure you have killed off any old instances of the defer_or_not process):
$ ./defer_or_not 2PID 3215: running with the SA_NODEFER signal flag SetProcess awaiting signals ...
Now, in another Terminal window, we run the shell script:
$ ./bombard_sig.sh $(pgrep defer_or_not) 12
As soon as the script runs, firing off (12) signals to the process, the output is as follows:
sighdlr: signal 10, s=1 ; total=1; stack 0x7ffe9e17a0b0 :sighdlr: signal 10, s=2 ; total=2; stack 0x7ffe9e1799b0 :2sighdlr: signal 10, s=3 ; total=3; stack 0x7ffe9e1792b0 :3sighdlr: signal 10, s=4 ; total=4; stack 0x7ffe9e178bb0 :4sighdlr: signal 10, s=5 ; total=5; ...