我如何看到从孩子收到的信号名称?

时间:2016-10-28 01:18:50

标签: c unix signals

例如:

if (WIFEXITED(status)) {
              printf("Im child, finish with status=%d\n", WEXITSTATUS(status));

是否可以使用信号名称而不是数字?

1 个答案:

答案 0 :(得分:0)

FYI

WIFEXITED(status)
Description:
 Returns True if status was returned for a child that terminated normally. In this case, we can
 execute WEXITSTATUS(status) to fetch the value that the child passed to exit, _exit,or _Exit.