Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Unix real time signals

by zwon (Abbot)
on Oct 16, 2010 at 09:32 UTC ( #865644=note: print w/replies, xml ) Need Help??


in reply to Unix real time signals

The following code should do the trick:

use strict; use warnings; use Config; use List::MoreUtils qw(firstidx); my @signals = split / /, $Config{sig_name}; my $rtmin = firstidx { $_ eq 'RTMIN' } @signals; my $rt5name = $signals[ $rtmin + 5 ]; print "They call it $rt5name\n"; $SIG{$rt5name} = sub { warn "caught it!\n" }; sleep 10 while 42;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://865644]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2022-08-14 06:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?