Hello,
I have a question about processing SIGQUIT signal in the subshell.
Why the "original" state for SIGQUIT in subshell is considered as
"core dump", but not ignored as in non-subshell. I guess, it a little
bit confusing.
There is extract from bash manual related to the question.
Signals clause of bash manual claims that:
... In all cases, bash ignores SIGQUIT. ...
Manual for the trap command says:
Trapped signals that are not being ignored are reset to
their original values in a subshell or subshell environment when one
is created.
Script for testing:
#!/bin/bash
(
sleep inf
echo OK
)
echo END
When you press Ctrl+\, you will see END. But if subshell would also
ignore SIGQUIT, it also could print OK.
Thank you.