Permalink
Browse files

fixes to return value in testutil

  • Loading branch information...
groys
groys committed Apr 30, 2010
1 parent 34a62ba commit 86454eaf46b1dd90c17779529d58261be75d75e7
Showing with 4 additions and 3 deletions.
  1. +4 −3 test/testutil.php
View
@@ -69,8 +69,8 @@ function scribe_stop($scribe_ctrl_path, $port, $pid = 0) {
system($command, $error);
echo "$command => $error\n";
- if ($error === false) {
- return false;
+ if ($error == 0) {
+ return true;
}
sleep($wait);
@@ -80,7 +80,8 @@ function scribe_stop($scribe_ctrl_path, $port, $pid = 0) {
system('kill -9 ' . $pid, $success);
echo "kill -9 $pid => $success\n";
- if ($success === false) {
+ // If the kill failed
+ if ($success == -1 ) {
print("ERROR: scribed did not stop after $wait seconds.\n");
return false;
}

0 comments on commit 86454ea

Please sign in to comment.