Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Executing script in normal/daemon mode and adding start/stop capability

by afoken (Abbot)
on Oct 07, 2009 at 22:23 UTC ( #799828=note: print w/replies, xml ) Need Help??


in reply to Executing script in normal/daemon mode and adding start/stop capability

I prefer daemontools for background processes, as explained in Re: keep a module in shared memory. No need to add a single line of code to your script, no race conditions when handling PID files (because daemontools do not need PID files), and a simple control mechanism. Just write a char to a pipe or let the svc utility do that for you.

(And yes, djb's behaviour regarding errno is just silly and childish. Apply the patch from thedjbway.org or complain loudly to djb that he does not want to accept the C standards. And by the way, also apply the other patch that adds support for SIGQUIT, SIGUSR1, and SIGUSR2.)

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://799828]
help
Chatterbox?
[erix]: Harakiri with a nuke on the white house, that'd clean up the staff there a bit too ;)
[erix]: (sorry, I'm always a bit violent on fridays)
LanX predicts problems for Erix next time he lines up at an US immigration counter
[erix]: but tuesdays just as bad
[erix]: thanks for the heads-up but that's a line-up studiiously avoided :P
[LanX]: yeah too far for someone who can't even make it to Amsterdam
LanX looking for a good magit tutorial
LanX ... and git in general
[erix]: I've been to Amsterdam before you were born
[LanX]: 1899?

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (12)
As of 2017-08-18 13:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (302 votes). Check out past polls.

    Notices?