annotate druntime/import/stdc/posix/sys/wait.d @ 760:6f33b427bfd1

Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Wed, 12 Nov 2008 00:19:18 +0100
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
760
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
1 /**
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
2 * D header file for POSIX.
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
3 *
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
4 * Copyright: Public Domain
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
5 * License: Public Domain
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
6 * Authors: Sean Kelly
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
7 * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
8 */
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
9 module stdc.posix.sys.wait;
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
10
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
11 private import stdc.posix.config;
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
12 public import stdc.posix.sys.types; // for id_t, pid_t
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
13 public import stdc.posix.signal; // for siginfo_t (XSI)
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
14 //public import stdc.posix.resource; // for rusage (XSI)
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
15
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
16 extern (C):
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
17
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
18 //
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
19 // Required
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
20 //
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
21 /*
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
22 WNOHANG
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
23 WUNTRACED
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
24
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
25 WEXITSTATUS
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
26 WIFCONTINUED
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
27 WIFEXITED
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
28 WIFSIGNALED
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
29 WIFSTOPPED
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
30 WSTOPSIG
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
31 WTERMSIG
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
32
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
33 pid_t wait(int*);
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
34 pid_t waitpid(pid_t, int*, int);
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
35 */
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
36
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
37 version( linux )
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
38 {
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
39 const WNOHANG = 1;
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
40 const WUNTRACED = 2;
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
41
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
42 private
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
43 {
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
44 const __W_CONTINUED = 0xFFFF;
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
45
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
46 extern (D) int __WTERMSIG( int status ) { return status & 0x7F; }
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
47 }
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
48
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
49 //
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
50 // NOTE: These macros assume __USE_BSD is not defined in the relevant
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
51 // C headers as the parameter definition there is different and
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
52 // much more complicated.
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
53 //
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
54 extern (D) int WEXITSTATUS( int status ) { return ( status & 0xFF00 ) >> 8; }
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
55 extern (D) int WIFCONTINUED( int status ) { return status == __W_CONTINUED; }
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
56 extern (D) bool WIFEXITED( int status ) { return __WTERMSIG( status ) == 0; }
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
57 extern (D) bool WIFSIGNALED( int status )
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
58 {
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
59 return ( cast(byte) ( ( status & 0x7F ) + 1 ) >> 1 ) > 0;
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
60 }
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
61 extern (D) bool WIFSTOPPED( int status ) { return ( status & 0xFF ) == 0x7F; }
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
62 extern (D) int WSTOPSIG( int status ) { return WEXITSTATUS( status ); }
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
63 extern (D) int WTERMSIG( int status ) { return status & 0x7F; }
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
64 }
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
65 else version( darwin )
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
66 {
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
67 const WNOHANG = 1;
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
68 const WUNTRACED = 2;
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
69
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
70 private
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
71 {
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
72 const _WSTOPPED = 0177;
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
73 }
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
74
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
75 extern (D) int _WSTATUS(int status) { return (status & 0177); }
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
76 extern (D) int WEXITSTATUS( int status ) { return (status >> 8); }
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
77 extern (D) int WIFCONTINUED( int status ) { return status == 0x13; }
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
78 extern (D) bool WIFEXITED( int status ) { return _WSTATUS(status) == 0; }
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
79 extern (D) bool WIFSIGNALED( int status )
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
80 {
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
81 return _WSTATUS( status ) != _WSTOPPED && _WSTATUS( status ) != 0;
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
82 }
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
83 extern (D) bool WIFSTOPPED( int status ) { return _WSTATUS( status ) == _WSTOPPED; }
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
84 extern (D) int WSTOPSIG( int status ) { return status >> 8; }
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
85 extern (D) int WTERMSIG( int status ) { return _WSTATUS( status ); }
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
86 }
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
87 else version( freebsd )
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
88 {
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
89 const WNOHANG = 1;
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
90 const WUNTRACED = 2;
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
91 const WCONTINUED = 4;
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
92
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
93 private
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
94 {
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
95 const _WSTOPPED = 0177;
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
96 }
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
97
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
98 extern (D) int _WSTATUS(int status) { return (status & 0177); }
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
99 extern (D) int WEXITSTATUS( int status ) { return (status >> 8); }
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
100 extern (D) int WIFCONTINUED( int status ) { return status == 0x13; }
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
101 extern (D) bool WIFEXITED( int status ) { return _WSTATUS(status) == 0; }
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
102 extern (D) bool WIFSIGNALED( int status )
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
103 {
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
104 return _WSTATUS( status ) != _WSTOPPED && _WSTATUS( status ) != 0;
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
105 }
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
106 extern (D) bool WIFSTOPPED( int status ) { return _WSTATUS( status ) == _WSTOPPED; }
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
107 extern (D) int WSTOPSIG( int status ) { return status >> 8; }
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
108 extern (D) int WTERMSIG( int status ) { return _WSTATUS( status ); }
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
109 }
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
110 else
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
111 {
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
112 static assert( false );
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
113 }
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
114
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
115 pid_t wait(int*);
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
116 pid_t waitpid(pid_t, int*, int);
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
117
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
118 //
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
119 // XOpen (XSI)
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
120 //
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
121 /*
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
122 WEXITED
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
123 WSTOPPED
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
124 WCONTINUED
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
125 WNOHANG
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
126 WNOWAIT
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
127
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
128 enum idtype_t
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
129 {
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
130 P_ALL,
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
131 P_PID,
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
132 P_PGID
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
133 }
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
134
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
135 int waitid(idtype_t, id_t, siginfo_t*, int);
6f33b427bfd1 Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
136 */