Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: Signal Handling in a Child Process

by Illuminatus (Curate)
on Aug 08, 2012 at 17:29 UTC ( #986326=note: print w/replies, xml ) Need Help??

in reply to Signal Handling in a Child Process

I am forking a child process (a perl file is called in that child process)...
I'm not sure what you mean here. Do you mean that you are forking a child that is, in turn, forking a perl script?. When I run the following:
#! /usr/bin/perl sub HANDLER { print "Got 'USR1'. Exiting with Return Code '110' !!\n"; exit 110; } $SIG{USR1} = 'HANDLER'; while (1) { sleep(60); }
In background, and send SIGUSR1 to it, it immediately exits with code 110 (if only the HANDLER function had returned, the script would have continued to run).


Log In?

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2016-10-22 07:58 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (293 votes). Check out past polls.