in reply to signal handling in exec()'d code
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: signal handling in exec()'d code
by jliv (Initiate) on Jan 25, 2010 at 12:33 UTC | |
by jethro (Monsignor) on Jan 25, 2010 at 13:41 UTC | |
by jliv (Initiate) on Jan 25, 2010 at 14:38 UTC |