void Socket::Private::set_inherit(bool i)
{
int flags = fcntl(handle, F_GETFD);
- fcntl(handle, F_SETFD, (flags&~O_CLOEXEC)|(i?O_CLOEXEC:0));
+ fcntl(handle, F_SETFD, (flags&~O_CLOEXEC)|(i?0:O_CLOEXEC));
}
int Socket::Private::set_option(int level, int optname, const void *optval, socklen_t optlen)