父进程判断子进程退出状态
//正常退出判断
if(WIFEXITED(status)){
printf("child exit with %d\n", WEXITSTATUS(status));
}
//因为某种信号中断获取状态
if(WIFSIGNALED(status)){
printf("child killed by %d\n", WTERMSIG(status));
}
//正常退出判断
if(WIFEXITED(status)){
printf("child exit with %d\n", WEXITSTATUS(status));
}
//因为某种信号中断获取状态
if(WIFSIGNALED(status)){
printf("child killed by %d\n", WTERMSIG(status));
}