diff --git a/sys/include/wait.h b/sys/include/wait.h index 8c1c6bf..e1903bb 100644 --- a/sys/include/wait.h +++ b/sys/include/wait.h @@ -4,8 +4,12 @@ #include -/* Extract the status code from the process */ +/* Extract the status code from the status */ #define WEXITSTATUS(_x) (_x & 0x000000ff) +#define _WSTATUS(_x) ((_x & 0x0000ff00) >> 8) +/* Exited gracefully */ +#define WIFEXITED(_x) (_WSTATUS(_x) == 0) +/* Extract the pid from the status (Castor specific) */ #define WGETPID(_x) ((pid_t)(_x >> 16)) /* Flags to waitpid */