summaryrefslogtreecommitdiff
path: root/lib/open3.pl
diff options
context:
space:
mode:
authorPerl 5 Porters <perl5-porters@africa.nicoh.com>1996-09-07 23:49:09 +0000
committerAndy Dougherty <doughera@lafcol.lafayette.edu>1996-09-07 23:49:09 +0000
commit78f9f922804cab72776fd44f9fdc8ee973dff61e (patch)
treef4aa62dff4c02211dc93a8523ce3ee42a2a83ae0 /lib/open3.pl
parent3f193590c5874b4c5b016955e0e787f60536c0dc (diff)
downloadperl-78f9f922804cab72776fd44f9fdc8ee973dff61e.tar.gz
perl 5.003_05: lib/open3.pl
The I/O directions on the dad_wtr and kid_rdr were backwards. IO/Open3.pm didn't have this error.
Diffstat (limited to 'lib/open3.pl')
-rw-r--r--lib/open3.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/open3.pl b/lib/open3.pl
index 03e151c2d6..8b3917a851 100644
--- a/lib/open3.pl
+++ b/lib/open3.pl
@@ -68,10 +68,10 @@ sub main'open3 {
die "open2: fork failed: $!";
} elsif ($kidpid == 0) {
if ($dup_wtr) {
- open(STDIN, ">&$dad_wtr") if (fileno(STDIN) != fileno($dad_wtr));
+ open(STDIN, "<&$dad_wtr") if (fileno(STDIN) != fileno($dad_wtr));
} else {
close($dad_wtr);
- open(STDIN, ">&$kid_rdr");
+ open(STDIN, "<&$kid_rdr");
}
if ($dup_rdr) {
open(STDOUT, ">&$dad_rdr") if (fileno(STDOUT) != fileno($dad_rdr));