skalibs

Mirror/fork of https://skarnet.org/software/skalibs/
git clone https://ccx.te2000.cz/git/skalibs
Log | Files | Refs | README | LICENSE

fd_read.c (245B)


      1 /* ISC license. */
      2 
      3 #include <unistd.h>
      4 #include <errno.h>
      5 #include <skalibs/allreadwrite.h>
      6 
      7 ssize_t fd_read (int fd, char *buf, size_t len)
      8 {
      9   ssize_t r ;
     10   do r = read(fd, buf, len) ;
     11   while ((r == -1) && (errno == EINTR)) ;
     12   return r ;
     13 }