-static void test_kill(int sig)
-{
- pid_t pid;
- if((pid = vfork()) == 0) {
- raise(sig);
- t_error("raise failed: %s\n", strerror(errno));
- }
- if (pid == -1) {
- t_error("vfork failed: %s\n", strerror(errno));
- return;
- }
- int r = w(pid);
- TEST(WIFSIGNALED(r), "child did not get killed\n");
- TEST(WTERMSIG(r) == sig, "child is killed by %d, expected %d\n", WTERMSIG(r), sig);
-}
-