Some thoughts and comments and conclusions:
The other reason why I was using the system command, is that I wanted to catch the full return codes, AND also capture the output (which I did to a tmp file, and then read the tmp file into a variable, and passed both the return status, and the shell output as output to a wrapper System() subroutine. But $? contains the status of the backticked shell command as well as of the system command, and the shell's output goes to a variable, so in effect I can do the same. And since I won't need to dissect the return status to see if it died from a signal (because Perl catches the signal), it should all be sufficient for my needs.
defined($pid = open(CHILDPROC, "$cmdargs |")) or die "Can't fork: $!"; while(<CHILDPROC>){ # ... }
Thanks again for all the advice.
cheers!
-cadphile
In reply to Re: SIGINT in system() with shell metachars
by cadphile
in thread SIGINT in system() with shell metachars
by cadphile
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |