File tree Expand file tree Collapse file tree 6 files changed +9
-0
lines changed
Expand file tree Collapse file tree 6 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -374,6 +374,9 @@ sub update_io {
374374 my $msg = " $_ [0] at $caller [1] line $caller [2] ($caller2 [1] line $caller2 [2]).\n " ;
375375 print $stderr $msg ;
376376 print STDERR $msg ;
377+ close ($out_fh );
378+ close ($err_fh );
379+ close ($in_fh ) if $in_fh ;
377380 POSIX::_exit(127);
378381 };
379382
Original file line number Diff line number Diff line change @@ -180,10 +180,12 @@ sub run {
180180 sleep 0.2;
181181 }
182182 }
183+ close ($wfh );
183184
184185 $self -> clear_sig_handlers();
185186
186187 my $exit = read_line($fh ) // die " Could not get exit code" ;
188+ close ($fh );
187189 $exit = parse_exit($exit );
188190 if ($exit -> {sig }) {
189191 print STDERR " Terminated with signal: $exit ->{sig}.\n " ;
Original file line number Diff line number Diff line change @@ -129,6 +129,7 @@ sub yath {
129129 push @lines => @new ;
130130 print map { chomp ($_ ); " DEBUG: > $_ \n " } @new if $debug > 1;
131131 }
132+ close ($rh );
132133 }
133134 else {
134135 print " DEBUG: Waiting for $pid \n " if $debug ;
Original file line number Diff line number Diff line change @@ -170,6 +170,7 @@ sub process_runner_output {
170170 stream => Test2::Harness::Util::File::Stream-> new(name => File::Spec-> catfile($auxdir , $path )),
171171 };
172172 }
173+ closedir ($dh );
173174
174175 for my $file (sort keys %{$self -> {+RUNNER_AUX_HANDLES}}) {
175176 my $data = $self -> {+RUNNER_AUX_HANDLES}-> {$file };
Original file line number Diff line number Diff line change @@ -318,6 +318,7 @@ sub find_libraries {
318318 next unless -f $path && $path =~ m /\. pm$ / ;
319319 push @found => [$path , $prefix ];
320320 }
321+ closedir ($dh );
321322 }
322323
323324 push @bases => $new_base if @$new_base ;
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ BEGIN {
3333 if ($no_stat {lc ($^O)}) {
3434 opendir (my $dh , $dir ) or die " $! " ;
3535 my $key = join ' :' => sort readdir ($dh );
36+ closedir ($dh );
3637 last if $seen {$key }++;
3738 }
3839 else {
You can’t perform that action at this time.
0 commit comments