Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^3: Generic Daemon Use

by andyford (Curate)
on Feb 02, 2007 at 18:20 UTC ( [id://597989]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Generic Daemon Use
in thread Generic Daemon Use

Here's another thought: run your Daemon in the foreground:

newdaemon( progname => 'ticktockd', pidfile => '/var/run/ticktockd.pid', configfile => '/etc/ticktockd.conf', foreground => 1, );
If it's running in the background you may never see any output.

non-Perl: Andy Ford

Replies are listed 'Best First'.
Re^4: Generic Daemon Use
by smist (Acolyte) on Feb 02, 2007 at 18:41 UTC
    Thanks again. Foregrounding it I see that the Generic.pm module is calling a subroutine named write_file (for writing the pid file) that doesn't exist. I'm not sure where that particular subroutine is supposed to be found but I wrote added one of my own to that module file and got the daemon to run and stay running. I'll play around some more with it. I just needed to get past this hurdle. Thanks for your help!

      write_file is exported by File::Slurp, which the module uses at the top of the file. It looks like the return value from it isn't checked though, so if the problem is that it is failing to write the pidfile for some reason that would explain why your replacement of it with your own subroutine seems to help.

      -- David Irving

      Wow, you're right, that routine never got implemented, just documented. Hee. I'd report it as a bug

      non-Perl: Andy Ford

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (1)
As of 2024-04-25 02:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found