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

#include <sys/types.h>
#include <errno.h>
#include <sys/select.h>

int fd_select (int n, fd_set *rfds, fd_set *wfds, fd_set *xfds, struct timeval *tv)
{
  register int r ;
  do
    r = select(n, rfds, wfds, xfds, tv) ;
  while ((r == -1) && (errno == EINTR)) ;
  return r ;
}