Try this,seems it's not working for complex case:
perl -we 'while(1){system("echo " . "1 "x 10000 . "|more");exit if ($? + & 127) == 2;}'
In reply to Re^2: How to make `system` not ignore SIG INT in Perl?
by PerlOnTheWay
in thread How to make `system` not ignore SIG INT in Perl?
by PerlOnTheWay
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |