Revision fb05b3253ede3a327732bc4de37a96b91253e447 authored by mohamadi on 17 August 2017, 16:44:37 UTC, committed by mohamadi on 17 August 2017, 16:44:37 UTC
1 parent 4a15865
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 ...