This is not necessarily 100% true even though I agree with the logic of your mental exercise. Although it is system dependent, check you local *nix docs: On many systems, signals are only set to their default handler values if the process calling exec is catching them. Otherwise (e.g., if the calling process has them set to ignore) those settings are often carried across the exec call. The Solaris docs for exec(2) say this for example:

Signals that are being caught by the calling process are set to the default disposition in the new process image (see signal(3C)). Otherwise, the new process image inherits the signal dispositions of the calling process.

What this has meant on every system I've worked on is that process settings of ignore or default, even if different from the defaults, are carried across the exec call.

Strange to me that Perl would override default behavior for SIGSTP -- I'd think it would just pick up what the system specifies by virtue of calling the system's fork/exec sytem calls. So check your docs on these and see if SIGSTP is defined as being reset to its default across either fork (doubtful) or exec (more likely but not on the Solaris system I'm on here at work). Since you're setting it to IGNORE, that would be carried across the exec call on my system.

Signals are very system dependent though, so no surprise if that's not true for you.


In reply to Re: Re: stty & signals by steves
in thread stty & signals by hotshot

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.