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

#include <fcntl.h>
#include <skalibs/djbunix.h>

int uncoe (int fd)
{
  int flags = fcntl(fd, F_GETFD, 0) ;
  if (flags < 0) return -1 ;
  return fcntl(fd, F_SETFD, flags & ~FD_CLOEXEC) ;
}