diff options
Diffstat (limited to 'selftest/target/Samba4.pm')
-rw-r--r-- | selftest/target/Samba4.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm index 361152b928..b79e29fad6 100644 --- a/selftest/target/Samba4.pm +++ b/selftest/target/Samba4.pm @@ -1363,10 +1363,12 @@ sub teardown_env($$) my $count = 0; until (kill(0, $pid) == 0) { + my $childpid = waitpid(-1, WNOHANG); + # This should give it time to write out the gcov data sleep(1); $count++; - last if $count > 20; + last if $childpid == 0 or $count > 20; } # If it is still around, kill it @@ -1409,6 +1411,8 @@ sub check_env($$) { my ($self, $envvars) = @_; + my $childpid = waitpid(-1, WNOHANG); + return (-p $envvars->{SAMBA_TEST_FIFO}); } |