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

#include <sys/types.h>
#include <unistd.h>
#include <errno.h>
#include <skalibs/allreadwrite.h>

ssize_t fd_read (int fd, char *buf, size_t len)
{
  register ssize_t r ;
  do r = read(fd, buf, len) ;
  while ((r == -1) && (errno == EINTR)) ;
  return r ;
}