summaryrefslogtreecommitdiff
path: root/news4-posix.h
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2000-11-05 09:08:45 +0000
committerBen Lindstrom <mouring@eviladmin.org>2000-11-05 09:08:45 +0000
commit67e21e1eb2366f4598f8ee483dfbacc92010a687 (patch)
tree7d62334093443926fdef24bcc4ceb9a84a9eb7d6 /news4-posix.h
parentfd496053df95abd3046a46729b1a12ae540b07ad (diff)
- (bal) Reworked NEWS-OS and NeXT ports to extract waitpid() and
setsid() into more common files
Diffstat (limited to 'news4-posix.h')
-rw-r--r--news4-posix.h18
1 files changed, 0 insertions, 18 deletions
diff --git a/news4-posix.h b/news4-posix.h
index 874067934..af1cac3f6 100644
--- a/news4-posix.h
+++ b/news4-posix.h
@@ -6,7 +6,6 @@
6#define _NEWS4_POSIX_H 6#define _NEWS4_POSIX_H
7 7
8#ifdef HAVE_NEWS4 8#ifdef HAVE_NEWS4
9
10#include <sys/wait.h> 9#include <sys/wait.h>
11 10
12typedef long clock_t; 11typedef long clock_t;
@@ -14,22 +13,5 @@ typedef long clock_t;
14/* FILE */ 13/* FILE */
15#define O_NONBLOCK 00004 /* non-blocking open */ 14#define O_NONBLOCK 00004 /* non-blocking open */
16 15
17/* WAITPID */
18#undef WIFEXITED
19#undef WIFSTOPPED
20#undef WIFSIGNALED
21
22#define _W_INT(w) (*(int*)&(w)) /* convert union wait to int */
23#define WIFEXITED(w) (!((_W_INT(w)) & 0377))
24#define WIFSTOPPED(w) ((_W_INT(w)) & 0100)
25#define WIFSIGNALED(w) (!WIFEXITED(w) && !WIFSTOPPED(w))
26#define WEXITSTATUS(w) (int)(WIFEXITED(w) ? ((_W_INT(w) >> 8) & 0377) : -1)
27#define WTERMSIG(w) (int)(WIFSIGNALED(w) ? (_W_INT(w) & 0177) : -1)
28#define WCOREFLAG 0x80
29#define WCOREDUMP(w) ((_W_INT(w)) & WCOREFLAG)
30
31int waitpid(int pid,int *stat_loc,int options);
32#define setsid() setpgrp(0, getpid())
33
34#endif /* HAVE_NEWS4 */ 16#endif /* HAVE_NEWS4 */
35#endif /* _NEWS4_POSIX_H */ 17#endif /* _NEWS4_POSIX_H */