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!) |