ret = kill(pid_server, SIGTERM);
assert(ret == 0);
+
+ pid = waitpid(pid_server, &ret, 0);
+ assert(pid == pid_server);
+ assert(WEXITSTATUS(ret) == 0);
}
/*
test6_client(sockpath);
- pid = wait(&ret);
- assert(pid != -1);
+ pid = waitpid(pid_server, &ret, 0);
+ assert(pid == pid_server);
+ assert(WEXITSTATUS(ret) == 0);
}
/*
ret = kill (pid, SIGKILL);
assert(ret == 0);
+ pid2 = waitpid(pid, &ret, 0);
+ assert(pid2 == pid);
+ assert(WEXITSTATUS(ret) == 0);
+
ret = stat(sockpath, &st);
assert(ret == 0);