Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Catching Signals in Perl

by yosefm (Friar)
on Sep 04, 2003 at 20:55 UTC ( #289025=note: print w/ replies, xml ) Need Help??


in reply to Catching Signals in Perl

like so:

local $SIG{HUP} = \&hup_handler;

Now, hup_handler will be called any time sighup is recieved.

update: Hmm... race condition... and I lost...

Update: Ok, sauoq, I fixed it like two seconds after my first post, but thanks.


Comment on Re: Catching Signals in Perl
Download Code
Re: Re: Catching Signals in Perl
by sauoq (Abbot) on Sep 04, 2003 at 20:57 UTC

    No such hook: __HUP__

    That should just be "HUP" without underscores.

    -sauoq
    "My two cents aren't worth a dime.";
    
Re: Re: Catching Signals in Perl
by pileswasp (Monk) on Sep 10, 2003 at 13:24 UTC
    Special ++ for the local.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2014-07-26 08:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (175 votes), past polls