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

#include <unistd.h>
#include <errno.h>
#include <skalibs/djbunix.h>

int fd_chown (int fd, uid_t uid, gid_t gid)
{
  int r ;
  do
    r = fchown(fd, uid, gid) ;
  while ((r == -1) && (errno == EINTR)) ;
  return r ;
}