From e495118aaba20d05e6da937040de4f82b600b70b Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 4 Mar 2012 18:10:35 +1100 Subject: [PATCH] selftest: Fix waitpid termination test --- selftest/target/Samba3.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) { -- 2.34.1