skalibs

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

openc_writeatb.c (296B)


      1 /* ISC license. */
      2 
      3 #include <skalibs/djbunix.h>
      4 #include <skalibs/unix-transactional.h>
      5 
      6 int openc_writeatb (int dirfd, char const *name)
      7 {
      8   int fd = openc_writeat(dirfd, name) ;
      9   if (fd == -1) return -1 ;
     10   if (ndelay_off(fd) == -1)
     11   {
     12     fd_close(fd) ;
     13     return -1 ;
     14   }
     15   return fd ;
     16 }