diff options
Diffstat (limited to 'include/sys/wait.h')
-rw-r--r-- | include/sys/wait.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/sys/wait.h b/include/sys/wait.h index b6dfe01d..a7ad7cd1 100644 --- a/include/sys/wait.h +++ b/include/sys/wait.h @@ -45,8 +45,8 @@ pid_t wait4 (pid_t, int *, int, struct rusage *); #define WSTOPSIG(s) WEXITSTATUS(s) #define WCOREDUMP(s) ((s) & 0x80) #define WIFEXITED(s) (!WTERMSIG(s)) -#define WIFSTOPPED(s) (((s) & 0xff) == 0x7f) -#define WIFSIGNALED(s) (((signed char) (((s) & 0x7f) + 1) >> 1) > 0) +#define WIFSTOPPED(s) ((short)((((s)&0xffff)*0x10001)>>8) > 0x7f00) +#define WIFSIGNALED(s) (((s)&0xffff)-1 < 0xffu) #define WIFCONTINUED(s) ((s) == 0xffff) #ifdef __cplusplus |