1 2 3 4 5 6 7 8 9 10 11 12
/* * wait.c */ #include <stdlib.h> #include <sys/wait.h> #include <sys/types.h> pid_t wait(int *status) { return wait4((pid_t) - 1, status, 0, NULL); }