in reply to Re: stty & signals
in thread stty & signals

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.