Hi morgon,

Looking back at what I wrote, it sounds like I'm very much against Daemon::Control, but my opinion is not that extreme - I've used the module myself and of course if it works, why not :-) And it sounds like you can just create the PID file in /tmp and ignore it afterwards.

Just one more thought though: You mentioned in another reply that there are other init processes that depend on yours to set the time correctly. In that case, I'm not sure if forking into the background is good? Because I suspect init will only block until it's started the process, but not until it finishes, and if setting the time takes a few seconds, other processes may have been launched by init while the time hasn't been set yet. If that is indeed a problem then one solution might be to set Daemon::Control's fork option to zero.

Regards,
-- Hauke D


In reply to Re^5: Daemon::Control pid-files by haukex
in thread Daemon::Control pid-files by morgon

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.