wait_pid.c (248B)
1 /* Public domain. */ 2 3 #include <sys/types.h> 4 #include <sys/wait.h> 5 #include "error.h" 6 #include "wait.h" 7 8 int wait_pid( int* wstat, int pid ) 9 { 10 int r; 11 12 do 13 r = waitpid(pid,wstat,0); 14 while ((r == -1) && (errno == error_intr)); 15 return r; 16 }