X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=posix%2Finclude%2Fsys%2Fwait.h;h=080c180f1af8e80dedd979de1ada3a850643448e;hp=bc6122c3de64c0d92a7a2e39215a661bf62faf0f;hb=95236481372dcee2e62a4f225400600658b9432b;hpb=cca52d053bc8cca0b9662589fc1d2958cbe91588 diff --git a/posix/include/sys/wait.h b/posix/include/sys/wait.h index bc6122c3de6..080c180f1af 100644 --- a/posix/include/sys/wait.h +++ b/posix/include/sys/wait.h @@ -1,4 +1,4 @@ -/* $Id: wait.h,v 1.2 2002/02/20 09:17:56 hyperion Exp $ +/* $Id: wait.h,v 1.3 2002/05/17 01:37:15 hyperion Exp $ */ /* * sys/wait.h @@ -26,16 +26,44 @@ #define __SYS_WAIT_H_INCLUDED__ /* INCLUDES */ +#include +#include /* OBJECTS */ /* TYPES */ +typedef enum __tagidtype_t +{ + P_ALL, + P_PID, + P_PGID +} idtype_t; /* CONSTANTS */ +/* Possible values for the options argument to waitid() */ +#define WEXITED (0x00000001) /* Wait for processes that have exited */ +#define WSTOPPED (0x00000002) /* Status will be returned for any child that has stopped upon receipt of a signal */ +#define WNOWAIT (0x00000004) /* Keep the process whose status is returned in infop in a waitable state */ + +#define WCONTINUED (0x00000008) /* Status will be returned for any child that was stopped and has been continued */ +#define WNOHANG (0x00000010) /* Return immediately if there are no children to wait for */ +#define WUNTRACED (0x00000020) /* Report status of stopped child process */ /* PROTOTYPES */ +pid_t wait(int *); +pid_t wait3(int *, int, struct rusage *); +int waitid(idtype_t, id_t, siginfo_t *, int); +pid_t waitpid(pid_t, int *, int); /* MACROS */ +/* Macros for analysis of process status values */ +#define WEXITSTATUS(__STATUS__) (1) /* Return exit status */ +#define WIFCONTINUED(__STATUS__) (1) /* True if child has been continued */ +#define WIFEXITED(__STATUS__) (1) /* True if child exited normally */ +#define WIFSIGNALED(__STATUS__) (1) /* True if child exited due to uncaught signal */ +#define WIFSTOPPED(__STATUS__) (1) /* True if child is currently stopped */ +#define WSTOPSIG(__STATUS__) (1) /* Return signal number that caused process to stop */ +#define WTERMSIG(__STATUS__) (1) /* Return signal number that caused process to terminate */ #endif /* __SYS_WAIT_H_INCLUDED__ */