Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Unix real time signals

by samtregar (Abbot)
on Oct 16, 2010 at 03:26 UTC ( [id://865618]=note: print w/replies, xml ) Need Help??


in reply to Re: Unix real time signals
in thread Unix real time signals

If you "use warnings" you'll see:

No such signal: SIGSIGRTMIN+5 at rt.pl line 5.

I can't get anything to work with the +5 stuff, but this code works:

#!/usr/bin/perl use strict; use warnings; $SIG{'RTMIN'} = \&on_sig; print $$, "\n"; while (1) { sleep 1; print ".\n"; } sub on_sig { my $sig = shift; print "somebody told me $sig"; }

When I send it a signal like this:

$ kill -s SIGRTMIN 763

I get:

somebody told me RTMIN.

-sam

(Wow, I've been gone too long. This was supposed to be a reply to the original question!)

Replies are listed 'Best First'.
Re^3: Unix real time signals
by llancet (Friar) on Oct 16, 2010 at 06:13 UTC
    I thought first 3 RT signals are conserved by something. I forgot where I seen that...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2025-06-15 08:32 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.