Unverified Commit 2b0481de authored by Gabi Melman's avatar Gabi Melman Committed by GitHub

Always use SOCK_CLOEXEC in tcp client

parent 1389f866
......@@ -75,11 +75,7 @@ public:
int last_errno = 0;
for (auto *rp = addrinfo_result; rp != nullptr; rp = rp->ai_next)
{
#ifdef SPDLOG_PREVENT_CHILD_FD
int const flags = SOCK_CLOEXEC;
#else
int const flags = 0;
#endif
socket_ = ::socket(rp->ai_family, rp->ai_socktype | flags, rp->ai_protocol);
if (socket_ == -1)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment