waitpid - wait 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().