程序博客网 > 2.5次元自动测量编程
来源:互联网 发布:2.5次元自动测量编程 编辑:程序博客网 时间:2024/06/07 06:00
#include "apue.h"#include <sys/wait.h>voidpr_exit(int status){if (WIFEXITED(status))printf("normal termination, exit status = %d/n",WEXITSTATUS(status));else if (WIFSIGNALED(status))printf("abnormal termination, signal number = %d%s/n",WTERMSIG(status),#ifdefWCOREDUMPWCOREDUMP(status) ? " (core file generated)" : "");#else"");#endifelse if (WIFSTOPPED(status))printf("child stopped, signal number = %d/n",WSTOPSIG(status));}