8 下面的代码中,使用 fork创建了一个子进程,接着在子进程中向自身发送 SIGSTOP 信号,然后父进程向子进程发送SIGKILL 信号。 int main() { pid_t retfork; int ret; if ((retfork = fork()) < 0) { printf("Fork error\n"); exit(1); } if (retfork == 0) { printf("Child proc(pid:%d) wait for signal\n", getpid()); raise(SIGSTOP); exit(0); } else { sleep(3); if ((waitpid(retfork, NULL, WNOHANG)) == 0) { if ((ret = _____________) == 0) { printf("Parent proc send SIGKILL to child proc(pid:%d)\n",retfork); } else { printf("Parent kill error\n"); } } waitpid(retfork, NULL, 0); printf("Child proc exit\n"); printf("Parent proc exit\n"); exit(0); } }