- (bal) Imported NEWS-OS waitpid() macros into NeXT. Since implementation

is more correct then current version.
This commit is contained in:
Ben Lindstrom 2000-10-19 23:43:24 +00:00
parent 81fa28abaa
commit e5a8525242
2 changed files with 9 additions and 4 deletions

View File

@ -1,5 +1,7 @@
20001020
- (djm) Don't define _REENTRANT for SNI/Reliant Unix
- (bal) Imported NEWS-OS waitpid() macros into NeXT. Since implementation
is more correct then current version.
20001018
- (stevesk) Add initial support for setproctitle(). Current

View File

@ -39,11 +39,14 @@
#undef WIFSTOPPED
#undef WIFSIGNALED
#define WIFEXITED(w) (!((w) & 0377))
#define WIFSTOPPED(w) ((w) & 0100)
#define _W_INT(w) (*(int*)&(w)) /* convert union wait to int */
#define WIFEXITED(w) (!((_W_INT(w)) & 0377))
#define WIFSTOPPED(w) ((_W_INT(w)) & 0100)
#define WIFSIGNALED(w) (!WIFEXITED(w) && !WIFSTOPPED(w))
#define WEXITSTATUS(w) (int)(WIFEXITED(w) ? (((w) >> 8) & 0377) : -1)
#define WTERMSIG(w) (int)(WIFSIGNALED(w) ? ((w) & 0177) : -1)
#define WEXITSTATUS(w) (int)(WIFEXITED(w) ? ((_W_INT(w) >> 8) & 0377) : -1)
#define WTERMSIG(w) (int)(WIFSIGNALED(w) ? (_W_INT(w) & 0177) : -1)
#define WCOREFLAG 0x80
#define WCOREDUMP(w) ((_W_INT(w)) & WCOREFLAG)
/* Swap out the next 'BSDish' wait() for a more POSIX complient one */
pid_t posix_wait(int *status);