Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: how do i create a daemon ??

by Brovnik (Hermit)
on Sep 28, 2001 at 20:17 UTC ( #115424=note: print w/ replies, xml ) Need Help??


in reply to how do i create a daemon ??

I want to create a daemon

Use Proc::Daemon

that runs two perl programs that I have made, but not

Use fork to create new processes.

if the programs is running one of the other programs schould be check every 5 min and the other schould be check every 15 min. and

Several options, depending on how sure you want to be. One simple way is for the child process to save it's PID in a known location such as /var/run and delete as it exits. The parent can check for the known files before starting the child.

Use sleep or e.g. Sys::AlarmCall to set timers.

I want the daemon to run as xxdaemon not perl ./daemon.pl

Rename daemon.pl as xxdaemon, make it executable and make sure it has a shebang line.
--
Brovnik


Comment on Re: how do i create a daemon ??

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (8)
As of 2014-07-11 07:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (220 votes), past polls