Mon Aug 2 08:49:30 1993 Stu Grossman (grossman at cygnus.com)
authorStu Grossman <grossman@cygnus>
Mon, 2 Aug 1993 15:55:05 +0000 (15:55 +0000)
committerStu Grossman <grossman@cygnus>
Mon, 2 Aug 1993 15:55:05 +0000 (15:55 +0000)
* 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

index 4093258a01c6cad5c722cddc6751cb0ed4a18c6f..a72943cd9ee017060ebd9dd2242f8044c49a3c08 100644 (file)
@@ -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.  */
 
This page took 0.026484 seconds and 4 git commands to generate.