Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Why this daemon can only receive the HUP signal no more than one time?

by chb (Deacon)
on Feb 23, 2009 at 10:58 UTC ( [id://745743]=note: print w/replies, xml ) Need Help??


in reply to Why this daemon can only receive the HUP signal no more than one time?

I haven't tested any code, but it always looks like a red flag to me if there is significantly more stuff than variable assignment inside a signal handler. In doSigHup() you are doing the whole relaunch inside a signal handler sub. I would try to call relaunch() from the main loop in hupMain(). doSigHup() would just set a global variable (e.g. $do_relaunch = 1) which must be checked in the main loop.
  • Comment on Re: Why this daemon can only receive the HUP signal no more than one time?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2024-04-24 20:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found