summaryrefslogtreecommitdiff
path: root/src/libstddjb/wait_nointr.c
blob: 4e7a17aac6b75d875aa628003622b4f7f260e0e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* ISC license. */

#include <sys/wait.h>
#include <errno.h>
#include <skalibs/djbunix.h>

pid_t wait_nointr (int *wstat)
{
  pid_t r ;
  do
    r = wait(wstat) ;
  while ((r == (pid_t)-1) && (errno == EINTR)) ;
  return r ;
}