http://www.perlmonks.org?node_id=289025


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.