From d93e0582faab13b272d265f2db620d9d8f07545a Mon Sep 17 00:00:00 2001 From: Stu Grossman Date: Mon, 2 Aug 1993 15:55:05 +0000 Subject: [PATCH] Mon Aug 2 08:49:30 1993 Stu Grossman (grossman at cygnus.com) * wait.h (WEXITSTATUS, WSTOPSIG): Mask down to 8 bits. This is for systems that store stuff into the high 16 bits of a wait status. --- include/wait.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/wait.h b/include/wait.h index 4093258a01c..a72943cd9ee 100644 --- a/include/wait.h +++ b/include/wait.h @@ -25,9 +25,9 @@ #define WIFSTOPPED(w) (((w)&0377) == 0177) #endif -#define WEXITSTATUS(w) ((w) >> 8) /* same as WRETCODE */ +#define WEXITSTATUS(w) (((w) >> 8) & 0377) /* same as WRETCODE */ #define WTERMSIG(w) ((w) & 0177) -#define WSTOPSIG(w) ((w) >> 8) +#define WSTOPSIG WEXITSTATUS /* These are not defined in POSIX, but are used by our programs. */ -- 2.30.2