Search
lxdream.org :: lxdream/test/include/sys/wait.h
lxdream 0.9.1
released Jun 29
Download Now
filename test/include/sys/wait.h
changeset 185:6755a04c447f
author nkeynes
date Fri Feb 08 00:06:56 2008 +0000 (16 years ago)
permissions -rw-r--r--
last change Fix LDS/STS to FPUL/FPSCR to check the FPU disabled bit. Fixes
the linux 2.4.0-test8 kernel boot
(this wasn't exactly very well documented in the original manual)
view annotate diff log raw
     1 #ifndef _SYS_WAIT_H
     2 #define _SYS_WAIT_H
     4 #ifdef __cplusplus
     5 extern "C" {
     6 #endif
     8 #include <sys/types.h>
    10 #define WNOHANG 1
    11 #define WUNTRACED 2
    13 /* A status looks like:
    14       <2 bytes info> <2 bytes code>
    16       <code> == 0, child has exited, info is the exit value
    17       <code> == 1..7e, child has exited, info is the signal number.
    18       <code> == 7f, child has stopped, info was the signal number.
    19       <code> == 80, there was a core dump.
    20 */
    22 #define WIFEXITED(w)	(((w) & 0xff) == 0)
    23 #define WIFSIGNALED(w)	(((w) & 0x7f) > 0 && (((w) & 0x7f) < 0x7f))
    24 #define WIFSTOPPED(w)	(((w) & 0xff) == 0x7f)
    25 #define WEXITSTATUS(w)	(((w) >> 8) & 0xff)
    26 #define WTERMSIG(w)	((w) & 0x7f)
    27 #define WSTOPSIG	WEXITSTATUS
    29 pid_t wait (int *);
    30 pid_t waitpid (pid_t, int *, int);
    32 /* Provide prototypes for most of the _<systemcall> names that are
    33    provided in newlib for some compilers.  */
    34 pid_t _wait (int *);
    36 #ifdef __cplusplus
    37 };
    38 #endif
    40 #endif
.