waitpid_nointr.c (263B)
1 /* ISC license. */ 2 3 #include <sys/wait.h> 4 #include <errno.h> 5 #include <skalibs/djbunix.h> 6 7 pid_t waitpid_nointr (pid_t pid, int *wstat, int flags) 8 { 9 pid_t r ; 10 do r = waitpid(pid, wstat, flags) ; 11 while ((r == (pid_t)-1) && (errno == EINTR)) ; 12 return r ; 13 }