summaryrefslogtreecommitdiff
path: root/src/libstddjb/uncoe.c
blob: 61593b94e42be7277d052d0e630adddd7e88e08d (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)
{
   register int flags = fcntl(fd, F_GETFD, 0) ;
   if (flags < 0) return -1 ;
   return fcntl(fd, F_SETFD, flags & ~FD_CLOEXEC) ;
}