]> granicus.if.org Git - postgis/commitdiff
Close opened filedescriptors after use. Might help with #2509
authorSandro Santilli <strk@keybit.net>
Wed, 16 Oct 2013 16:12:39 +0000 (16:12 +0000)
committerSandro Santilli <strk@keybit.net>
Wed, 16 Oct 2013 16:12:39 +0000 (16:12 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@12038 b70326c6-7e19-0410-871a-916f4a2858ee

regress/run_test.pl

index 37dc04dca8d616c5cd9c44282ca02773693c9be9..d903447e10ffad693819228169d72511ff628767 100755 (executable)
@@ -467,6 +467,7 @@ sub run_simple_sql
        # Check for ERROR lines
        open FILE, "$tmpfile";
        my @lines = <FILE>;
+       close FILE;
        my @errors = grep(/^ERROR/, @lines);
        
        if ( @errors > 0 )
@@ -930,6 +931,7 @@ sub run_dumper_test
   # Produce the output SHP file.
   open DUMPFILE, "$dump_file" or die "Cannot open dump file $dump_file\n";
   my @dumplines = <DUMPFILE>;
+  close DUMPFILE;
   my $dumpstring = join '', @dumplines;
   chop($dumpstring);
   my @cmd = ("${PGSQL2SHP}", "-f", ${shpfile}, ${DB}, ${dumpstring});