diff --git a/tests/auth/superuser-t.c b/tests/auth/superuser-t.c index bf41f8a033..617b667eb7 100644 --- a/tests/auth/superuser-t.c +++ b/tests/auth/superuser-t.c @@ -441,7 +441,8 @@ int main(int argc, char **argv) printf("Config directory is %s\n", dirname); serverPid = fork(); if (serverPid == -1) { - /* Bang */ + sysbail("fork"); + } else if (serverPid == 0) { execl(argv[0], argv[0], "-server", dirname, NULL); ret = 1; diff --git a/tests/common/servers.c b/tests/common/servers.c index de5801a61c..a14ae20cf7 100644 --- a/tests/common/servers.c +++ b/tests/common/servers.c @@ -161,7 +161,9 @@ afstest_StopServer(pid_t serverPid) kill(serverPid, SIGTERM); - waitpid(serverPid, &status, 0); + if (waitpid(serverPid, &status, 0) < 0) { + sysbail("waitpid"); + } if (WIFSIGNALED(status) && WTERMSIG(status) != SIGTERM) { fprintf(stderr, "Server died exited on signal %d\n", WTERMSIG(status));