Just another Perl shrine | |
PerlMonks |
Re: Re: Re: SIGINT in system() with shell metacharsby chip (Curate) |
on Jun 25, 2003 at 14:33 UTC ( [id://268870]=note: print w/replies, xml ) | Need Help?? |
Ah, quite so. You are up against a fug/beature in the shell, i.e. that when the shells spawns kids killed by a signal, the shell doesn't exit with a signal-like exit status.
I suggest using the 'trap' shell statement to generate a non-standard exit status from signal delivery. There are some timing quirks that may hit you if the child is doing things like saving and restoring tty modes, but otherwise it works (I just tested it on Linux):
The shell's 'trap' statement is a handy feature, seldom used. -- Chip Salzenberg, Free-Floating Agent of Chaos
In Section
Seekers of Perl Wisdom
|
|