my $select = IO::Select->new();
my $alive = 1;
my $pid;
+my $interactive = -t STDOUT;
my $code;
sub sigchld
while ( $alive ) {
foreach my $h ( $select->can_read() ) {
- sysread $h, $_, 1024;
+ sysread $h, $_, 102400;
print $fout $_ if $fout;
- if ( $h == \*child_err ) {
+ if ( $interactive && $h == \*child_err ) {
print "\033[31m$_\033[0m";
} else {
print $_;