1 2 3 4 5 6 7 8 9 10
#include "sys/types.h" #include <sys/wait.h> pid_t wait(int *stat_loc) { return waitpid((pid_t)-1, stat_loc, 0); } /* POSIX(1) */