Hmm, if any of perl's internal calls are ignoring it without a good reason (I guess a "panic: interpreter is broken" would be a good reason) then that's probably a bug that should be fixed; in any case, the underlying *STDERR still points to the standard Apache error log, so such messages won't be lost entirely. (And in fact that seems like the real benefit of the tie - if anything goes horribly wrong in the logging code, the fallback is as simple as untie *STDERR.)

In general, if anything is calling out to a separate process I'd expect it to be handling STDERR from that itself - exactly as Email::Valid is trying to do - so I don't think that's a problem either.

The issue as I see it is making sure I get out of the way of such child processes, so that they are actually able to handle STDERR themselves. And to do that, either I've got to know in advance that the child process will be created (as I now do for the MX check), or I have to get perl to tell me that it's about to happen (or has just happened).

Hugo


In reply to Re: Re: Catching fork() with tied STDERR by hv
in thread Catching fork() with tied STDERR by hv

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.