summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2000-10-19 23:43:24 +0000
committerBen Lindstrom <mouring@eviladmin.org>2000-10-19 23:43:24 +0000
commite5a8525242deb13d5263d2da46365053f05262d4 (patch)
tree63e417a8b80f3c1b3840b2bb0894bb772db21566
parent81fa28abaab971695cb4a855e9363bc766613d18 (diff)
- (bal) Imported NEWS-OS waitpid() macros into NeXT. Since implementation
is more correct then current version.
-rw-r--r--ChangeLog2
-rw-r--r--next-posix.h11
2 files changed, 9 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 614f3d93d..a0cc51185 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
120001020 120001020
2 - (djm) Don't define _REENTRANT for SNI/Reliant Unix 2 - (djm) Don't define _REENTRANT for SNI/Reliant Unix
3 - (bal) Imported NEWS-OS waitpid() macros into NeXT. Since implementation
4 is more correct then current version.
3 5
420001018 620001018
5 - (stevesk) Add initial support for setproctitle(). Current 7 - (stevesk) Add initial support for setproctitle(). Current
diff --git a/next-posix.h b/next-posix.h
index 3ac4739d0..bd815af43 100644
--- a/next-posix.h
+++ b/next-posix.h
@@ -39,11 +39,14 @@
39#undef WIFSTOPPED 39#undef WIFSTOPPED
40#undef WIFSIGNALED 40#undef WIFSIGNALED
41 41
42#define WIFEXITED(w) (!((w) & 0377)) 42#define _W_INT(w) (*(int*)&(w)) /* convert union wait to int */
43#define WIFSTOPPED(w) ((w) & 0100) 43#define WIFEXITED(w) (!((_W_INT(w)) & 0377))
44#define WIFSTOPPED(w) ((_W_INT(w)) & 0100)
44#define WIFSIGNALED(w) (!WIFEXITED(w) && !WIFSTOPPED(w)) 45#define WIFSIGNALED(w) (!WIFEXITED(w) && !WIFSTOPPED(w))
45#define WEXITSTATUS(w) (int)(WIFEXITED(w) ? (((w) >> 8) & 0377) : -1) 46#define WEXITSTATUS(w) (int)(WIFEXITED(w) ? ((_W_INT(w) >> 8) & 0377) : -1)
46#define WTERMSIG(w) (int)(WIFSIGNALED(w) ? ((w) & 0177) : -1) 47#define WTERMSIG(w) (int)(WIFSIGNALED(w) ? (_W_INT(w) & 0177) : -1)
48#define WCOREFLAG 0x80
49#define WCOREDUMP(w) ((_W_INT(w)) & WCOREFLAG)
47 50
48/* Swap out the next 'BSDish' wait() for a more POSIX complient one */ 51/* Swap out the next 'BSDish' wait() for a more POSIX complient one */
49pid_t posix_wait(int *status); 52pid_t posix_wait(int *status);