skalibs

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

fd_sync.c (197B)


      1 /* ISC license. */
      2 
      3 #include <unistd.h>
      4 #include <errno.h>
      5 
      6 #include <skalibs/djbunix.h>
      7 
      8 int fd_sync (int fd)
      9 {
     10   int r ;
     11   do r = fsync(fd) ;
     12   while (r == -1 && errno == EINTR) ;
     13   return r ;
     14 }