Add WIFEXITED

This commit is contained in:
Ali Mashtizadeh 2023-10-02 19:53:08 -04:00
parent 032bf32d88
commit 32cd3ba42b

View File

@ -4,8 +4,12 @@
#include <sys/cdefs.h>
/* 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 */