Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: Writing a Perl Daemon

by onkar (Novice)
on Dec 15, 2009 at 06:37 UTC ( #812829=note: print w/ replies, xml ) Need Help??


in reply to Re: Writing a Perl Daemon
in thread Writing a Perl Daemon

# # startDaemon # # Fork and detach from the parent process # sub startDaemon { # # Fork and detach from the parent process # eval { Proc::Daemon::Init; }; if ($@) { dienice("Unable to start daemon: $@"); } # # Get a PID file # dienice("Already running!") if hold_pid_file($PIDFILE); } # # dienice # # write die messages to the log before die'ing # sub dienice ($) { my ($package, $filename, $line) = caller; $log->critical("$_[0] at line $line in $filename"); die $_[0]; }
I am not getting any error ! but the daemon is also not running ? What might be wrong ! I tried to debug it , but it hangs !


Comment on Re^2: Writing a Perl Daemon
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2014-10-26 07:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (152 votes), past polls