Commit | Line | Data |
---|---|---|
1 | #include <sys/types.h> | |
2 | #include <sys/wait.h> | |
3 | #include "error.h" | |
4 | ||
5 | /* restriction: you must not care about any other child. */ | |
6 | int wait_pid(wstat,pid) int *wstat; int pid; | |
7 | { | |
8 | int r; | |
9 | do | |
10 | r = wait(wstat); | |
11 | while ((r != pid) && ((r != -1) || (errno == error_intr))); | |
12 | return r; | |
13 | } |