You may be doing something wrong in the code you're not showing us. This works on my machine:
use strict; use warnings; $SIG{INT} = sub { print "caught SIGINT\n"; exit }; sleep 1; exec $^X, $0;
When I run this, wait a few seconds and send press Ctrl+C I get the "caught SIGINT" message, so the re-installing of the signal handler worked.
In reply to Re: signal handling in exec()'d code
by moritz
in thread signal handling in exec()'d code
by jliv
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |