linux c 父进程判断子进程退出状态

xiaoxiao2021-02-28  15

父进程判断子进程退出状态 //正常退出判断 if(WIFEXITED(status)){     printf("child exit with %d\n", WEXITSTATUS(status)); } //因为某种信号中断获取状态 if(WIFSIGNALED(status)){     printf("child killed by %d\n", WTERMSIG(status)); }
转载请注明原文地址: https://www.6miu.com/read-200405.html

最新回复(0)