Raw File
Tip revision: cdf62de27585ebda18574745ab7fc9c079c8795a authored by mohamadi on 10 February 2019, 20:46:05 UTC
nthash.hpp: added precomputed seed for faster rolling
Tip revision: cdf62de
#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);
back to top