waitpid의 wstatus상태값에 대한 문의
글쓴이: htiger / 작성시간: 월, 2020/09/07 - 9:14오전
프로그램의 종료를 기다리는 다음의 waitpid함수 이용하여 프로그램 종료 상태 확인시,
waitpid(child_pid, &status , 0);
status값을 출력해 보면 segment fault에 대한 이 11 or 139로 확인 됩니다. 두 가지 모두 segment fault에 대한 사항으로 설명들이 있는 것은 확인하였는데요( WTERMSIG(status)로 확인 ). 11(0x0b)와 139(0x8b)의 정확한 차이를 알고 싶습니다.
감사합니다.
Forums:
...
찾아보니까 이건 것 같네요:
WCOREDUMP(status)
returns true if the child produced a core dump. This macro should only be employed if WIFSIGNALED returned true. This macro is not specified in POSIX.1-2001 and is not available on some UNIX implementations (e.g., AIX, SunOS). Only use this enclosed in #ifdef WCOREDUMP ... #endif.
댓글 달기