Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Unix real time signals

by zwon (Abbot)
on Oct 16, 2010 at 09:32 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-04-16 17:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found