Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
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


Comment on Re: Signal Handling in a Child Process
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2015-07-29 05:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (260 votes), past polls