in reply to Re^2: pipes: killing the child?
in thread pipes: killing the child?
system($^X, -le => '$|=1; { print ++$i; sleep 1; redo; }')
but it doesn't wait for the child to end before continuing, and the child's STDOUT ends up in $fr_chld instead of being sent to the parent's STDOUT.
As for the command itself, my demo program runs Perl ($^X) to execute an infinite loop ({ ...; redo; }) which outputs a number every second (print ++$i; sleep 1;).
|
|---|