doing so is unnecessary and occasionally harmful.
p4raw-id: //depot/perl@22252
else {
# child
while (<STDIN>) { print; }
- close STDIN;
exit(0);
}
else {
# child
print "pipe_from_fork\n";
- close STDOUT;
exit(0);
}
print STDOUT "stdout 1\n"; # this works for
print STDERR "stderr 1\n"; # subprocesses too
- close STDOUT;
- close STDERR;
-
open STDOUT, ">&", $oldout or die "Can't dup \$oldout: $!";
open STDERR, ">&OLDERR" or die "Can't dup OLDERR: $!";