Add WIFEXITED
This commit is contained in:
parent
032bf32d88
commit
32cd3ba42b
@ -4,8 +4,12 @@
|
|||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
|
|
||||||
/* Extract the status code from the process */
|
/* Extract the status code from the status */
|
||||||
#define WEXITSTATUS(_x) (_x & 0x000000ff)
|
#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))
|
#define WGETPID(_x) ((pid_t)(_x >> 16))
|
||||||
|
|
||||||
/* Flags to waitpid */
|
/* Flags to waitpid */
|
||||||
|
Loading…
Reference in New Issue
Block a user