1 /*
2  * reimplementation of Daniel Bernstein's unix library.
3  * placed in the public domain by Uwe Ohse, uwe@ohse.de.
4  */
5 #include <sys/types.h>
6 #include <sys/wait.h>
7 #include "error.h"
8 #include "wait.h"
9 
wait_pid(int * wstat,int pid)10 int wait_pid(int *wstat,int pid)
11 {
12   int r;
13 
14   do
15     r = waitpid(pid,wstat,0);
16   while ((r == -1) && (errno == error_intr));
17   return r;
18 }
19