You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
315 B
18 lines
315 B
#include <common.h>
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
int pid = fork();
|
|
if (pid == 0)
|
|
while (1);
|
|
printf("killing %d...", pid);
|
|
if (kill(pid, SIGKILL) < 0)
|
|
err(-1, "kill");
|
|
printf("killed. waiting...");
|
|
if (wait(NULL) < 0)
|
|
err(-1, "wait failed\n");
|
|
printf("done\n");
|
|
printf("success\n");
|
|
return 0;
|
|
}
|