Signal handling propogating to children? Okay mental exercise for you. If you've got a perl script with a signal handler like this:
sub foo { }
$SIG{TERM}=\&foo;
fork() || exec("newprogram");
From
newprogram's perspective, what's supposed to happen when a sigterm comes along? Jump back into the parent process' signal handler? Go looking for a
foo of it's own? Segfault? :)
Signal handlers stay put during a fork(), but during the subsequent exec() they're reset to their default values. (And if you're exec'ing a shell, it's likely they're adjusted further even then.) The system() function essentially does a fork and exec to accomplish what it needs, so you're going to lose your signaling information.
A better place to start looking is to take away the suspend key (break, eol, etc..) and that'd be by going through the termios interface (or whatever the kids call it now). Some things that deal with that are: POSIX, Term::ReadKey (examples), ioctl, and calling stty to change the terminal's properties.