skalibs

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

fd_chown.c (238B)


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