in reply to Catching signals under Linux
On a more elementary level, why does this code:
produce this output:use strict; use warnings; use 5.010; use threads; sub thr_func { say 'in thread'; $SIG{'HUP'} = sub { say "signal caught" }; } my $thr = threads->create('thr_func'); $thr->kill('HUP')->join();
Signal SIGHUP received, but no signal handler set.
The threads docs seem pretty clear that you can signal a thread.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Catching signals under Linux
by JavaFan (Canon) on Jan 29, 2010 at 10:57 UTC | |
by locked_user sundialsvc4 (Abbot) on Jan 29, 2010 at 18:17 UTC | |
by 7stud (Deacon) on Jan 29, 2010 at 11:29 UTC |