Revision 741c9417282570a71c4042f0d2022493f26c4e49 authored by Johnathan Wong on 27 January 2020, 22:56:49 UTC, committed by GitHub on 27 January 2020, 22:56:49 UTC
* release 1.2.1 * ChangeLog: update version number Co-Authored-By: Lauren Coombe <lauren.e.coombe@gmail.com> Co-authored-by: Lauren Coombe <lauren.e.coombe@gmail.com>
1 parent b14e327
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);
}

Computing file changes ...