os/ossrv/genericopenlibs/openenvcore/include/sys/wait.dosc
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/genericopenlibs/openenvcore/include/sys/wait.dosc	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,291 @@
     1.4 +/** @file  ../include/sys/wait.h
     1.5 +@internalComponent
     1.6 +*/
     1.7 +
     1.8 +/** @fn  wait(int *status)
     1.9 +@param status
    1.10 +
    1.11 +Note: This description also covers the following functions -
    1.12 + waitpid() 
    1.13 +
    1.14 +@return   If wait returns due to a stopped
    1.15 +or terminated child process, the process ID of the child
    1.16 +is returned to the calling process.
    1.17 +Otherwise, a value of -1
    1.18 +is returned and errno is set to indicate the error. If wait4 , wait3 ,
    1.19 +or waitpid returns due to a stopped
    1.20 +or terminated child process, the process ID of the child
    1.21 +is returned to the calling process.
    1.22 +If there are no children not previously awaited,
    1.23 +-1 is returned with errno set to ECHILD .
    1.24 +Otherwise, if WNOHANG is specified and there are
    1.25 +no stopped or exited children,
    1.26 +0 is returned.
    1.27 +If an error is detected or a caught signal aborts the call,
    1.28 +a value of -1
    1.29 +is returned and errno is set to indicate the error.
    1.30 +
    1.31 +  The wait function suspends execution of its calling process until status information is available for a terminated child process,
    1.32 +or a signal is received.
    1.33 +On return from a successful wait call,
    1.34 +the status area contains termination information about the process that exited
    1.35 +as defined below.
    1.36 +
    1.37 + The wpid argument specifies the set of child processes for which to wait.
    1.38 +If wpid is -1, the call waits for any child process.
    1.39 +If wpid is 0,
    1.40 +the call waits for any child process in the process group of the caller.
    1.41 +If wpid is greater than zero, the call waits for the process with process id wpid .
    1.42 +If wpid is less than -1, the call waits for any process whose process group id
    1.43 +equals the absolute value of wpid .
    1.44 +
    1.45 +
    1.46 +
    1.47 +
    1.48 +
    1.49 + The waitpid function is identical to wait4 with an rusage value of zero.
    1.50 +
    1.51 + Note:
    1.52 +
    1.53 + The waitpid function waits for a process ID which is obtained using a 
    1.54 +  non-standard API popen3
    1.55 +
    1.56 +
    1.57 +
    1.58 +
    1.59 +
    1.60 +
    1.61 +
    1.62 +@see _exit()
    1.63 +@see exit()
    1.64 +
    1.65 +
    1.66 + 
    1.67 +
    1.68 +@publishedAll
    1.69 +@externallyDefinedApi
    1.70 +*/
    1.71 +
    1.72 +/** @fn  waitpid(pid_t wpid, int *status, int options)
    1.73 +@param wpid
    1.74 +@param status
    1.75 +@param options
    1.76 +
    1.77 +Refer to wait() for the documentation
    1.78 +
    1.79 +@see _exit()
    1.80 +@see exit()
    1.81 +
    1.82 +
    1.83 + 
    1.84 +
    1.85 +@publishedAll
    1.86 +@externallyDefinedApi
    1.87 +*/
    1.88 +
    1.89 +
    1.90 +/** @def _W_INT(w) 
    1.91 +
    1.92 +Macros to test the exit status returned by wait and extract the relevant values. Convert union wait to int.
    1.93 +
    1.94 +@publishedAll
    1.95 +@released
    1.96 +*/
    1.97 +
    1.98 +/** @def WCOREFLAG
    1.99 +
   1.100 +Macros to test the exit status returned by wait and extract the relevant values.
   1.101 +
   1.102 +@publishedAll
   1.103 +@externallyDefinedApi
   1.104 +*/
   1.105 +
   1.106 +/** @def _WSTATUS(x)	
   1.107 +
   1.108 +Macros to test the exit status returned by wait and extract the relevant values.
   1.109 +
   1.110 +@publishedAll
   1.111 +@released
   1.112 +*/
   1.113 +
   1.114 +/** @def _WSTOPPED
   1.115 +
   1.116 +Macros to test the exit status returned by wait and extract the relevant values.
   1.117 +
   1.118 +@publishedAll
   1.119 +@released
   1.120 +*/
   1.121 +
   1.122 +/** @def WIFSTOPPED(x)
   1.123 +
   1.124 +Macros to test the exit status returned by wait and extract the relevant values.
   1.125 +
   1.126 +@publishedAll
   1.127 +@externallyDefinedApi
   1.128 +*/
   1.129 +
   1.130 +/** @def WSTOPSIG(x)
   1.131 +
   1.132 +Macros to test the exit status returned by wait and extract the relevant values.
   1.133 +
   1.134 +@publishedAll
   1.135 +@externallyDefinedApi
   1.136 +*/
   1.137 +
   1.138 +/** @def WIFSIGNALED(x)
   1.139 +
   1.140 +Macros to test the exit status returned by wait and extract the relevant values.
   1.141 +
   1.142 +@publishedAll
   1.143 +@externallyDefinedApi
   1.144 +*/
   1.145 +
   1.146 +/** @def WTERMSIG(x)
   1.147 +
   1.148 +Macros to test the exit status returned by wait and extract the relevant values.
   1.149 +
   1.150 +@publishedAll
   1.151 +@externallyDefinedApi
   1.152 +*/
   1.153 +
   1.154 +/** @def WIFEXITED(x)
   1.155 +
   1.156 +Macros to test the exit status returned by wait and extract the relevant values.
   1.157 +
   1.158 +@publishedAll
   1.159 +@externallyDefinedApi
   1.160 +*/
   1.161 +
   1.162 +/** @def WEXITSTATUS(x)
   1.163 +
   1.164 +Macros to test the exit status returned by wait and extract the relevant values.
   1.165 +
   1.166 +@publishedAll
   1.167 +@externallyDefinedApi
   1.168 +*/
   1.169 +
   1.170 +/** @def WIFCONTINUED(x)
   1.171 +
   1.172 +Macros to test the exit status returned by wait and extract the relevant values.
   1.173 +
   1.174 +@publishedAll
   1.175 +@externallyDefinedApi
   1.176 +*/
   1.177 +
   1.178 +/** @def WCOREDUMP(x)
   1.179 +
   1.180 +Macros to test the exit status returned by wait and extract the relevant values.
   1.181 +
   1.182 +@publishedAll
   1.183 +@externallyDefinedApi
   1.184 +*/
   1.185 +
   1.186 +
   1.187 +/** @def W_EXITCODE(ret, sig)
   1.188 +
   1.189 +Macros to test the exit status returned by wait and extract the relevant values.
   1.190 +
   1.191 +@publishedAll
   1.192 +@externallyDefinedApi
   1.193 +*/
   1.194 +
   1.195 +/** @def W_STOPCODE(sig)	
   1.196 +
   1.197 +Macros to test the exit status returned by wait and extract the relevant values.
   1.198 +
   1.199 +@publishedAll
   1.200 +@externallyDefinedApi
   1.201 +*/
   1.202 +
   1.203 +/** @def WIFTERMINATED(x)
   1.204 +
   1.205 +Macros to test the termination code returned by wait and extract the relevant values.
   1.206 +
   1.207 +@publishedAll
   1.208 +@externallyDefinedApi
   1.209 +*/
   1.210 +
   1.211 +/** @def WTERMINATESTATUS(x)
   1.212 +
   1.213 +Macros to test the termination code returned by wait and extract the relevant values.
   1.214 +
   1.215 +@publishedAll
   1.216 +@externallyDefinedApi
   1.217 +*/
   1.218 +
   1.219 +/** @def WIFPANICED(x)
   1.220 +
   1.221 +Macros to test the panic code returned by wait and extract the relevant values.
   1.222 +
   1.223 +@publishedAll
   1.224 +@externallyDefinedApi
   1.225 +*/
   1.226 +
   1.227 +/** @def WPANICCODE(x)
   1.228 +
   1.229 +Macros to test the panic code returned by wait and extract the relevant values.
   1.230 +
   1.231 +@publishedAll
   1.232 +@externallyDefinedApi
   1.233 +*/
   1.234 +
   1.235 +/** @def WNOHANG	
   1.236 +
   1.237 +Don't hang in wait.
   1.238 + 
   1.239 +@publishedAll
   1.240 +@externallyDefinedApi
   1.241 +*/
   1.242 +
   1.243 +/** @def WUNTRACED
   1.244 +
   1.245 +Tell about stopped, untraced children.
   1.246 +
   1.247 +@publishedAll
   1.248 +@externallyDefinedApi
   1.249 +*/
   1.250 +
   1.251 +/** @def WCONTINUED
   1.252 +
   1.253 +Report a job control continued process.
   1.254 +
   1.255 +@publishedAll
   1.256 +@externallyDefinedApi
   1.257 +*/
   1.258 +
   1.259 +
   1.260 +/** @def WAIT_ANY
   1.261 +
   1.262 +Any process. Tokens for special values of the pid parameter to wait4.
   1.263 +
   1.264 +@publishedAll
   1.265 +@released
   1.266 +*/
   1.267 +
   1.268 +
   1.269 +/** @def WCOREFLAG	
   1.270 +
   1.271 +Macros to test the exit status returned by wait and extract the relevant values.
   1.272 +
   1.273 +@publishedAll
   1.274 +@released
   1.275 +*/
   1.276 +
   1.277 +
   1.278 +/** @def WLINUXCLONE
   1.279 +
   1.280 +Wait for kthread spawned from linux_clone.
   1.281 +
   1.282 +@publishedAll
   1.283 +@released
   1.284 +*/
   1.285 +
   1.286 +
   1.287 +/** @def WAIT_MYPGRP	
   1.288 +
   1.289 +Tokens for special values of the pid parameter to wait4. Any process in my process group.
   1.290 +
   1.291 +@publishedAll
   1.292 +@released
   1.293 +*/
   1.294 +