Hmm, it seems that tie hides / heals the problem instead of showing where $SIG{CHLD} is reset. Whatever changes $SIG{CHLD} does not use the "normal" way of storing values in a hash.

What might have happened here: The %SIG hash has some "magic" attached (see mg_vtable.h and mg.c in the perl sources), using tie changes that "magic" to the usual tie magic, and so the symbol %SIG no longer reflects the inner workings of perl (and the operating system). The "real" $SIG{CHLD} (the inner workings) was probably changed in both runs. And because the visible %SIG was not changed in the tied version of the test script, Net::DNS or code loaded by Net::DNS must have changed the "inner workings".

This should be visible when you untie %SIG after require. Change ...

info('after require');

... to ...

info('after require - still tied'); untie %SIG; info('after require - untied');

How could that happen?

Now what?

Another possibility: RHEL 5.11 was released in 2014, but it is based on code from 2007. Perl 5.12.5 was released in November 2012, so the first RHEL 5.x version that could containing that Perl version was 5.9 released in January 2013. Net::DNS 0.66 was released before January 2012, so it may have been part of RHEL 5.x since RHEL 5.8 released in February 2012. In January 2013, when RHEL was released, Net::DNS should have been updated to 0.69 to 0.72, all released in December 2012. What if someone at Redhat simply forgot to update Net::DNS and used the old version compiled for the older Perl version from RHEL 5.8?

A last idea: In Re^2: SIG{CHLD} altered by require statement on Perl 5.12.1, you show that both perl 5.8.8 and perl 5.12.5 use identical versions of Net::DNS. Did you mix both versions of Perl so that Perl 5.12.5 accidentally uses Net::DNS for perl 5.8.8? Compare the output of perl -e 'print join("\n",@INC)' for both perl versions. There should be no directory shared by both perl versions.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

In reply to Re^8: SIG{CHLD} altered by require statement on Perl 5.12.1 by afoken
in thread SIG{CHLD} altered by require statement on Perl 5.12.1 by sdingare

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.