in reply to Re^2: Gracefull Death of a Child: How to Catch Mum's SIGNALS?
in thread Gracefull Death of a Child: How to Catch Mum's SIGNALS?
As others have mentioned, threads are in a single process. So killing mum is killing darling. They're the same process, different thread.
In the code below, $SIG{$k} is local to the for block.
for my $k ( keys %SIG ) { local $SIG{$k} = sub { print "\n$$: Mum Caught \$SIG{ $k }\n" } }
For your own experience, try removing %SIG handlers from mum, and only put them in darling. Also, compare fork() to your threads.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Gracefull Death of a Child: How to Catch Mum's SIGNALS?
by Anonymous Monk on Apr 05, 2007 at 10:34 UTC |