From: Marcus Holland-Moritz Date: Sat, 13 Jan 2007 18:44:53 +0000 (+0100) Subject: Re: run/cloexec.t is failing X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c7fb9cc868654c002d9b7fa6bab082e47673296f;p=p5sagit%2Fp5-mst-13.2.git Re: run/cloexec.t is failing Message-ID: <20070113184453.7cd54bcf@r2d2> p4raw-id: //depot/perl@30078 --- diff --git a/t/run/cloexec.t b/t/run/cloexec.t index 83abd70..a9da0bd 100644 --- a/t/run/cloexec.t +++ b/t/run/cloexec.t @@ -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;