https://github.com/bcgsc/ntCard
Tip revision: de4252db866b8cf232fd746d94ad49de7ce02c03 authored by Hamid Mohamadi on 11 January 2017, 21:01:42 UTC
Update README.md
Update README.md
Tip revision: de4252d
Fcontrol.cpp
#include "Fcontrol.h"
#include <fcntl.h>
/* Set the FD_CLOEXEC flag of the specified file descriptor. */
int setCloexec(int fd)
{
int flags = fcntl(fd, F_GETFD, 0);
if (flags == -1)
return -1;
flags |= FD_CLOEXEC;
return fcntl(fd, F_SETFD, flags);
}