[klibc] wait()
Jon Smirl
jonsmirl at yahoo.com
Thu Feb 5 13:08:07 PST 2004
Can I get the macros for interpreting status from wait() added?
WIFEXITED(status)
returns true if the child terminated normally, that is, by call-
ing exit() or _exit(), or by returning from main().
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 _exit() or as the argument for a
return statement in the main program. This macro can only be
evaluated if WIFEXITED returned true.
WIFSIGNALED(status)
returns true if the child process terminated because of a signal
which was not caught.
WTERMSIG(status)
returns the number of the signal that caused the child process
to terminate. This macro can only be evaluated if WIFSIGNALED
returned non-zero.
WIFSTOPPED(status)
returns true if the child process which caused the return is
currently stopped; this is only possible if the call was done
using WUNTRACED or when the child is being traced (see
ptrace(2)).
WSTOPSIG(status)
returns the number of the signal which caused the child to stop.
This macro can only be evaluated if WIFSTOPPED returned
non-zero.
=====
Jon Smirl
jonsmirl at yahoo.com
__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html
More information about the klibc
mailing list