]> git.ipfire.org Git - thirdparty/make.git/commitdiff
* tests/scripts/options/dash-f: [SV 62118] Close STDIN
authorPaul Smith <psmith@gnu.org>
Sun, 24 Apr 2022 14:40:10 +0000 (10:40 -0400)
committerPaul Smith <psmith@gnu.org>
Sun, 24 Apr 2022 17:48:03 +0000 (13:48 -0400)
On Windows we can't delete open files, so close STDIN before
removing the temporary input file.

tests/scripts/options/dash-f

index b3c78ad6c9bfcb4d1bb409dbd066c814acad1d2f..ab225cefe74a525fcd9e28be35fe2613dc947283 100644 (file)
@@ -83,8 +83,6 @@ my $hello = 'hello.mk';
 my $bye = 'bye.mk';
 my $byesrc = 'bye.mk.src';
 
-unlink($hello, $bye, $byesrc);
-
 create_file($hello, 'all:; $(info hello, world)
 ');
 
@@ -157,6 +155,7 @@ for my $opt (@opts) {
     run_make_test('', "-f$bye $opt", $answer);
 }
 
+close(STDIN);
 unlink($hello, $bye, $byesrc);
 
 # This tells the test driver that the perl test script executed properly.