CnUnix

[알림판목록 I] [알림판목록 II] [글목록][이 전][다 음]
[ CnUnix ] in KIDS
글 쓴 이(By): swhan (foo bar)
날 짜 (Date): 2002년 10월 24일 목요일 오후 05시 19분 29초
제 목(Title): Re: [Q] child 의 종료값 가져오기..


Linux쪽의 manpage입니다.
wait(2)
생략
       pid_t waitpid(pid_t pid, int *status, int options);
생략

       If status is not NULL, wait or waitpid store status infor-
       mation in the location pointed to by status.


       This status can be evaluated  with  the  following  macros
       (these macros take the stat buffer (an int) as an argument
       -- not a pointer to the buffer!):

       WIFEXITED(status)
              is non-zero if the child exited normally.

       WEXITSTATUS(status)
              evaluates to the least significant  eight  bits  of
              the  return  code  of  the  child which terminated,
              which may have been set as the argument to  a  call
              to exit() or as the argument for a return statement
              in the main program.  This macro can only be evalu-
              ated if WIFEXITED returned non-zero.

생략


@ 안나오는게 당연하죠? :)
[알림판목록 I] [알림판목록 II] [글 목록][이 전][다 음]
키 즈 는 열 린 사 람 들 의 모 임 입 니 다.