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.


In reply to Daemon dies instantly by dd-b

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.