Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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?
[Lady_Aleena]: karlgoethebeir, I finished another project tonight, making a module which printed stop printing. It was a headache and a half.
[karlgoethebier]: Lady_Aleena: Try it!
[Lady_Aleena]: marioroy, it has 3 subroutines which can be fed data to generate random things. See here.
[Lady_Aleena]: marioroy, it is used in 24 other modules I wrote.
[Lady_Aleena]: GUH! I wrote a script better than I thought! 8)

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (10)
As of 2017-05-29 09:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?