Skip to content

Commit cd7bde2

Browse files
committed
wait for zombies in 0031_pgbenchdl.pl
1 parent 7bf3562 commit cd7bde2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

t/0031_pgbenchdl.pl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
use Test::More tests => 1;
1010
use Data::Dumper;
1111

12+
use POSIX ":sys_wait_h";
13+
1214
my $cluster = new Cluster(3);
1315
$cluster->init();
1416
$cluster->start();
@@ -32,6 +34,7 @@
3234
sub isalive {
3335
my $benches = $_[0];
3436
my $any_alive = 0;
37+
waitpid(-1, WNOHANG);
3538
$any_alive = ($any_alive or (kill 0,$_->{'KIDS'}->[0]->{'PID'})) foreach @{$benches};
3639
return $any_alive;
3740
}

0 commit comments

Comments
 (0)