From: Andrew Bartlett Date: Sun, 4 Mar 2012 07:10:35 +0000 (+1100) Subject: selftest: Fix waitpid termination test X-Git-Tag: tdb-1.2.10~423 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e495118aaba20d05e6da937040de4f82b600b70b;p=thirdparty%2Fsamba.git selftest: Fix waitpid termination test --- diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm index c9ad7d31fef..a5ae8a1bb08 100755 --- a/selftest/target/Samba3.pm +++ b/selftest/target/Samba3.pm @@ -57,7 +57,7 @@ sub teardown_env($$) # This should give it time to write out the gcov data sleep(1); $count++; - last if $childpid == 0 or $count > 20; + last if $childpid == -1 or $count > 20; } if ($count <= 20) { @@ -74,7 +74,7 @@ sub teardown_env($$) my $childpid = waitpid(-1, WNOHANG); sleep(1); $count++; - last if $childpid == 0 or $count > 20; + last if $childpid == -1 or $count > 20; } if ($count <= 10) {