dd-b has asked for the wisdom of the Perl Monks concerning the following question:
I'm daemonizing my command proxy (now) using Proc::Daemon::Init(). And it promptly goes away.
Daemonizing closes all open file descriptors. I do it just before initializing logging, and I'm getting logging to happen. I've disabled the logging config that used to log to the console (Log::Log4perl) but am still logging to my log file. I'm trapping signals INT, TERM, and USR1, and ignoring PIPE. I don't have anything trying to do stdio that I can find.
I'm going to ramp up the logging and see what I can learn, but what could be going on? "This was supposed to be simple" :-) . Would console output abort the process? Would Perl attempting to send a warning abort the process?Added: got it, thanks! Path problem; daemonize also changes default directory to /, and that makes a mess of a lot of things in my logging and other config files.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Daemon dies instantly
by Eliya (Vicar) on Oct 14, 2011 at 23:02 UTC | |
|
Re: Daemon dies instantly
by GrandFather (Saint) on Oct 14, 2011 at 22:54 UTC | |
by dd-b (Pilgrim) on Oct 14, 2011 at 23:13 UTC | |
by GrandFather (Saint) on Oct 15, 2011 at 01:32 UTC | |
by dd-b (Pilgrim) on Oct 17, 2011 at 15:00 UTC | |
by dd-b (Pilgrim) on Oct 14, 2011 at 23:01 UTC | |
by GrandFather (Saint) on Oct 14, 2011 at 23:26 UTC |