Yes, that did it.
Making my main script ignore $SIG{CHILD} and making the child ignore $SIG{INT} and $SIG{HUP} makes it work the way I want it to.
Your code snippet almost works out of the box. Just had to change:
$SIG{INT} = $SIG{HUP} = sub{} ; # child
To
$SIG{INT} = $SIG{HUP} = 'IGNORE'; # child
Thanks!
In reply to Re^2: protect children from SIG{INT}
by pileofrogs
in thread protect children from SIG{INT}
by pileofrogs
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |