prexit.c

来自「apue第二版每一章节的c语言源码」· C语言 代码 · 共 23 行

C
23
字号
#include	<sys/types.h>#include	<sys/wait.h>#include	"ourhdr.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),#ifdef	WCOREDUMP				WCOREDUMP(status) ? " (core file generated)" : "");#else				"");#endif	else if (WIFSTOPPED(status))		printf("child stopped, signal number = %d\n",				WSTOPSIG(status));}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?