| [ 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. 생략 @ 안나오는게 당연하죠? :) |