waitwaitpid
Waitwaitpid is not a single system call but a reference to the family of POSIX APIs used to reap state changes of child processes, typically involving the wait and waitpid functions. These calls let a parent process synchronize with its children and collect exit status information, helping to prevent zombie processes.
The wait function provides a simple, blocking mechanism. int wait(int *status) waits for any child process to
The waitpid function offers finer control. int waitpid(pid_t pid, int *status, int options) selects which child
Status information is interpreted with macros such as WIFEXITED, WEXITSTATUS, WIFSIGNALED, WTERMSIG, WIFSTOPPED, WSTOPSIG, and WIFCONTINUED,
Usage scenarios include implementing shells, daemons, and resource managers that need reliable child lifecycle handling. While