Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

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

fnord

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://986326]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2016-12-02 23:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (51 votes). Check out past polls.