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();