Re: run/cloexec.t is failing
authorMarcus Holland-Moritz <mhx-perl@gmx.net>
Sat, 13 Jan 2007 18:44:53 +0000 (19:44 +0100)
committerGisle Aas <gisle@activestate.com>
Tue, 30 Jan 2007 11:13:51 +0000 (11:13 +0000)
Message-ID: <20070113184453.7cd54bcf@r2d2>

p4raw-id: //depot/perl@30078

t/run/cloexec.t

index 83abd70..a9da0bd 100644 (file)
@@ -146,7 +146,7 @@ cmp_ok( $parentfd1, '<=', $^F, "parent open fd=$parentfd1 (\$^F=$^F)" );
 test_inherited($parentfd1);
 close FHPARENT1 or die "close '$tmpfile1': $!";
 
-# ... and test that you cannot inherit fd = $^F+1.
+# ... and test that you cannot inherit fd = $^F+n.
 open FHPARENT1, "<$tmpfile1" or die "open '$tmpfile1': $!";
 open FHPARENT2, "<$tmpfile2" or die "open '$tmpfile2': $!";
 $parentfd2 = fileno FHPARENT2;
@@ -157,7 +157,7 @@ close FHPARENT2 or die "close '$tmpfile2': $!";
 close FHPARENT1 or die "close '$tmpfile1': $!";
 
 # ... and now you can inherit after incrementing.
-++$^F;
+$^F = $parentfd2;
 open FHPARENT2, "<$tmpfile2" or die "open '$tmpfile2': $!";
 open FHPARENT1, "<$tmpfile1" or die "open '$tmpfile1': $!";
 $parentfd1 = fileno FHPARENT1;