Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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 sharing their wisdom with the Monastery: (5)
As of 2025-06-17 14:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.