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

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

void fd_close (int fd)
{
  int e = errno ;
  while (close(fd) < 0 && errno == EINTR) ;
  errno = e ;
}