1 /* $Id: wait.h,v 1.3 2002/05/17 01:37:15 hyperion Exp $
6 * declarations for waiting. Conforming to the Single UNIX(r) Specification
7 * Version 2, System Interface & Headers Issue 5
9 * This file is part of the ReactOS Operating System.
12 * Created by KJK::Hyperion <noog@libero.it>
14 * THIS SOFTWARE IS NOT COPYRIGHTED
16 * This source code is offered for use in the public domain. You may
17 * use, modify or distribute it freely.
19 * This code is distributed in the hope that it will be useful but
20 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
21 * DISCLAMED. This includes but is not limited to warranties of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
25 #ifndef __SYS_WAIT_H_INCLUDED__
26 #define __SYS_WAIT_H_INCLUDED__
30 #include <sys/resource.h>
35 typedef enum __tagidtype_t
43 /* Possible values for the options argument to waitid() */
44 #define WEXITED (0x00000001) /* Wait for processes that have exited */
45 #define WSTOPPED (0x00000002) /* Status will be returned for any child that has stopped upon receipt of a signal */
46 #define WNOWAIT (0x00000004) /* Keep the process whose status is returned in infop in a waitable state */
48 #define WCONTINUED (0x00000008) /* Status will be returned for any child that was stopped and has been continued */
49 #define WNOHANG (0x00000010) /* Return immediately if there are no children to wait for */
50 #define WUNTRACED (0x00000020) /* Report status of stopped child process */
54 pid_t
wait3(int *, int, struct rusage
*);
55 int waitid(idtype_t
, id_t
, siginfo_t
*, int);
56 pid_t
waitpid(pid_t
, int *, int);
59 /* Macros for analysis of process status values */
60 #define WEXITSTATUS(__STATUS__) (1) /* Return exit status */
61 #define WIFCONTINUED(__STATUS__) (1) /* True if child has been continued */
62 #define WIFEXITED(__STATUS__) (1) /* True if child exited normally */
63 #define WIFSIGNALED(__STATUS__) (1) /* True if child exited due to uncaught signal */
64 #define WIFSTOPPED(__STATUS__) (1) /* True if child is currently stopped */
65 #define WSTOPSIG(__STATUS__) (1) /* Return signal number that caused process to stop */
66 #define WTERMSIG(__STATUS__) (1) /* Return signal number that caused process to terminate */
68 #endif /* __SYS_WAIT_H_INCLUDED__ */