17#ifndef ZEPHYR_INCLUDE_POSIX_SYS_WAIT_H_
18#define ZEPHYR_INCLUDE_POSIX_SYS_WAIT_H_
23#include <zephyr/kernel.h>
29#if defined(_POSIX_C_SOURCE) || defined(__DOXYGEN__)
31#if defined(_XOPEN_SOURCE) || defined(__DOXYGEN__)
33#define WCONTINUED K_PROCESS_WCONTINUED
36#define WNOHANG K_PROCESS_WNOHANG
38#define WUNTRACED K_PROCESS_WUNTRACED
41#define WEXITSTATUS(wstatus) K_WEXITSTATUS(wstatus)
42#if defined(_XOPEN_SOURCE) || defined(__DOXYGEN__)
44#define WIFCONTINUED(wstatus) ((wstatus) == 0xffff)
47#define WIFEXITED(wstatus) K_WIFEXITED(wstatus)
49#define WIFSIGNALED(wstatus) K_WIFSIGNALED(wstatus)
51#define WIFSTOPPED(wstatus) (((wstatus) & 0xff) == 0x7f)
53#define WSTOPSIG(wstatus) (((wstatus) >> 8) & 0xff)
55#define WTERMSIG(wstatus) K_WTERMSIG(wstatus)
58#define WEXITED K_PROCESS_WEXITED
60#define WNOWAIT K_PROCESS_WNOWAIT
62#define WSTOPPED K_PROCESS_WUNTRACED
64#if !defined(_IDTYPE_T_DECLARED) && !defined(__idtype_t_defined) || defined(__DOXYGEN__)
74#define _IDTYPE_T_DECLARED
75#define __idtype_t_defined
78#if !defined(_ID_T_DECLARED) && !defined(__id_t_defined)
84#if !defined(_PID_T_DECLARED) && !defined(__pid_t_defined)
86#define _PID_T_DECLARED
87#define __pid_t_defined
int pid_t
Process ID type.
Information associated with a received signal.
POSIX fundamental types (<sys/types.h>)
int id_t
Used as a general identifier; can contain at least a pid_t, uid_t, or gid_t.
pid_t waitpid(pid_t pid, int *stat_loc, int options)
Wait for a child process to terminate.
idtype
Identifier kind selecting the scope of a waitid() operation.
@ P_PGID
Wait for any child in a specific process group.
@ P_ALL
Wait for any child of the calling process.
@ P_PID
Wait for the child with a specific process ID.
pid_t wait(int *stat_loc)
Wait for any child process to terminate.
int waitid(idtype_t idtype, id_t id, siginfo_t *infop, int options)
Wait for a child process matching idtype and id to change state.
enum idtype idtype_t
Identifier kind selecting the scope of a waitid() operation.