From: Chip Salzenberg Date: Sat, 31 Jan 2004 17:29:05 +0000 (+0000) Subject: Don't show code closing STD{IN,OUT} before reopening, because X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0c2f6559512b2211f892f1a6ae8db4739c5369b4;p=p5sagit%2Fp5-mst-13.2.git Don't show code closing STD{IN,OUT} before reopening, because doing so is unnecessary and occasionally harmful. p4raw-id: //depot/perl@22252 --- diff --git a/pod/perlfork.pod b/pod/perlfork.pod index 8ce0739..832710a 100644 --- a/pod/perlfork.pod +++ b/pod/perlfork.pod @@ -208,7 +208,6 @@ write to a forked child: else { # child while () { print; } - close STDIN; exit(0); } @@ -238,7 +237,6 @@ And this one reads from the child: else { # child print "pipe_from_fork\n"; - close STDOUT; exit(0); } diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 32e33aa..3bd4339 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -2987,9 +2987,6 @@ C using various methods: 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: $!";