os/ossrv/genericopenlibs/openenvcore/include/sys/wait.dosc
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 /** @file  ../include/sys/wait.h
     2 @internalComponent
     3 */
     4 
     5 /** @fn  wait(int *status)
     6 @param status
     7 
     8 Note: This description also covers the following functions -
     9  waitpid() 
    10 
    11 @return   If wait returns due to a stopped
    12 or terminated child process, the process ID of the child
    13 is returned to the calling process.
    14 Otherwise, a value of -1
    15 is returned and errno is set to indicate the error. If wait4 , wait3 ,
    16 or waitpid returns due to a stopped
    17 or terminated child process, the process ID of the child
    18 is returned to the calling process.
    19 If there are no children not previously awaited,
    20 -1 is returned with errno set to ECHILD .
    21 Otherwise, if WNOHANG is specified and there are
    22 no stopped or exited children,
    23 0 is returned.
    24 If an error is detected or a caught signal aborts the call,
    25 a value of -1
    26 is returned and errno is set to indicate the error.
    27 
    28   The wait function suspends execution of its calling process until status information is available for a terminated child process,
    29 or a signal is received.
    30 On return from a successful wait call,
    31 the status area contains termination information about the process that exited
    32 as defined below.
    33 
    34  The wpid argument specifies the set of child processes for which to wait.
    35 If wpid is -1, the call waits for any child process.
    36 If wpid is 0,
    37 the call waits for any child process in the process group of the caller.
    38 If wpid is greater than zero, the call waits for the process with process id wpid .
    39 If wpid is less than -1, the call waits for any process whose process group id
    40 equals the absolute value of wpid .
    41 
    42 
    43 
    44 
    45 
    46  The waitpid function is identical to wait4 with an rusage value of zero.
    47 
    48  Note:
    49 
    50  The waitpid function waits for a process ID which is obtained using a 
    51   non-standard API popen3
    52 
    53 
    54 
    55 
    56 
    57 
    58 
    59 @see _exit()
    60 @see exit()
    61 
    62 
    63  
    64 
    65 @publishedAll
    66 @externallyDefinedApi
    67 */
    68 
    69 /** @fn  waitpid(pid_t wpid, int *status, int options)
    70 @param wpid
    71 @param status
    72 @param options
    73 
    74 Refer to wait() for the documentation
    75 
    76 @see _exit()
    77 @see exit()
    78 
    79 
    80  
    81 
    82 @publishedAll
    83 @externallyDefinedApi
    84 */
    85 
    86 
    87 /** @def _W_INT(w) 
    88 
    89 Macros to test the exit status returned by wait and extract the relevant values. Convert union wait to int.
    90 
    91 @publishedAll
    92 @released
    93 */
    94 
    95 /** @def WCOREFLAG
    96 
    97 Macros to test the exit status returned by wait and extract the relevant values.
    98 
    99 @publishedAll
   100 @externallyDefinedApi
   101 */
   102 
   103 /** @def _WSTATUS(x)	
   104 
   105 Macros to test the exit status returned by wait and extract the relevant values.
   106 
   107 @publishedAll
   108 @released
   109 */
   110 
   111 /** @def _WSTOPPED
   112 
   113 Macros to test the exit status returned by wait and extract the relevant values.
   114 
   115 @publishedAll
   116 @released
   117 */
   118 
   119 /** @def WIFSTOPPED(x)
   120 
   121 Macros to test the exit status returned by wait and extract the relevant values.
   122 
   123 @publishedAll
   124 @externallyDefinedApi
   125 */
   126 
   127 /** @def WSTOPSIG(x)
   128 
   129 Macros to test the exit status returned by wait and extract the relevant values.
   130 
   131 @publishedAll
   132 @externallyDefinedApi
   133 */
   134 
   135 /** @def WIFSIGNALED(x)
   136 
   137 Macros to test the exit status returned by wait and extract the relevant values.
   138 
   139 @publishedAll
   140 @externallyDefinedApi
   141 */
   142 
   143 /** @def WTERMSIG(x)
   144 
   145 Macros to test the exit status returned by wait and extract the relevant values.
   146 
   147 @publishedAll
   148 @externallyDefinedApi
   149 */
   150 
   151 /** @def WIFEXITED(x)
   152 
   153 Macros to test the exit status returned by wait and extract the relevant values.
   154 
   155 @publishedAll
   156 @externallyDefinedApi
   157 */
   158 
   159 /** @def WEXITSTATUS(x)
   160 
   161 Macros to test the exit status returned by wait and extract the relevant values.
   162 
   163 @publishedAll
   164 @externallyDefinedApi
   165 */
   166 
   167 /** @def WIFCONTINUED(x)
   168 
   169 Macros to test the exit status returned by wait and extract the relevant values.
   170 
   171 @publishedAll
   172 @externallyDefinedApi
   173 */
   174 
   175 /** @def WCOREDUMP(x)
   176 
   177 Macros to test the exit status returned by wait and extract the relevant values.
   178 
   179 @publishedAll
   180 @externallyDefinedApi
   181 */
   182 
   183 
   184 /** @def W_EXITCODE(ret, sig)
   185 
   186 Macros to test the exit status returned by wait and extract the relevant values.
   187 
   188 @publishedAll
   189 @externallyDefinedApi
   190 */
   191 
   192 /** @def W_STOPCODE(sig)	
   193 
   194 Macros to test the exit status returned by wait and extract the relevant values.
   195 
   196 @publishedAll
   197 @externallyDefinedApi
   198 */
   199 
   200 /** @def WIFTERMINATED(x)
   201 
   202 Macros to test the termination code returned by wait and extract the relevant values.
   203 
   204 @publishedAll
   205 @externallyDefinedApi
   206 */
   207 
   208 /** @def WTERMINATESTATUS(x)
   209 
   210 Macros to test the termination code returned by wait and extract the relevant values.
   211 
   212 @publishedAll
   213 @externallyDefinedApi
   214 */
   215 
   216 /** @def WIFPANICED(x)
   217 
   218 Macros to test the panic code returned by wait and extract the relevant values.
   219 
   220 @publishedAll
   221 @externallyDefinedApi
   222 */
   223 
   224 /** @def WPANICCODE(x)
   225 
   226 Macros to test the panic code returned by wait and extract the relevant values.
   227 
   228 @publishedAll
   229 @externallyDefinedApi
   230 */
   231 
   232 /** @def WNOHANG	
   233 
   234 Don't hang in wait.
   235  
   236 @publishedAll
   237 @externallyDefinedApi
   238 */
   239 
   240 /** @def WUNTRACED
   241 
   242 Tell about stopped, untraced children.
   243 
   244 @publishedAll
   245 @externallyDefinedApi
   246 */
   247 
   248 /** @def WCONTINUED
   249 
   250 Report a job control continued process.
   251 
   252 @publishedAll
   253 @externallyDefinedApi
   254 */
   255 
   256 
   257 /** @def WAIT_ANY
   258 
   259 Any process. Tokens for special values of the pid parameter to wait4.
   260 
   261 @publishedAll
   262 @released
   263 */
   264 
   265 
   266 /** @def WCOREFLAG	
   267 
   268 Macros to test the exit status returned by wait and extract the relevant values.
   269 
   270 @publishedAll
   271 @released
   272 */
   273 
   274 
   275 /** @def WLINUXCLONE
   276 
   277 Wait for kthread spawned from linux_clone.
   278 
   279 @publishedAll
   280 @released
   281 */
   282 
   283 
   284 /** @def WAIT_MYPGRP	
   285 
   286 Tokens for special values of the pid parameter to wait4. Any process in my process group.
   287 
   288 @publishedAll
   289 @released
   290 */
   291