WAITPID(3) Library Functions Manual WAITPID(3)

waitpidwait for a child process to stop or terminate

#include <sys/types.h>
#include <sys/wait.h>

pid_t waitpid(pid_t pid, int *stat_loc, int options);

Refer to wait(3) .

February 1997 posix.fail