1. I don't know what code you're looking at, the code I posted does chdir to /
  2. I don't really care what ____ systems do. I never said this would work there. This will work on almost any modern system. Legacy systems are the special case, not the cannonical case. Supporting anything that old is a specialist job, and you shouldn't expect all other code in the world to work there. In particular if it means the rest of the world has to take a performance hit.
  3. Perhaps that is true, but since when is double forking normally advised? Which Perl documentation that discusses this subject recommends doing that as the general case?
  4. I also don't open any extra filehandles. Should code like this go searching through the namespace and stop on all toes it finds, making it play poorly with others? No. You probably need them for your processes IO in that case. Is that the bug in this code, it allows IO? Which filehandle are you wanting to close, and why?

I think these "repairs" introduce some serious problems, particularly regarding messing with other filehandles, voodoo blahblahblah, efficiency.

"optimize for the common case."


--
Snazzy tagline here

In reply to Re^2: Yet Another Daemonization Stub by Aighearach
in thread Yet Another Daemonization Stub by Aighearach

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.