From 2b0481deede4a536a7bf7442b291dc460ed292c1 Mon Sep 17 00:00:00 2001 From: Gabi Melman Date: Fri, 13 Mar 2020 01:18:27 +0200 Subject: [PATCH] Always use SOCK_CLOEXEC in tcp client --- include/spdlog/details/tcp_client.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/include/spdlog/details/tcp_client.h b/include/spdlog/details/tcp_client.h index b5538323..e2035a09 100644 --- a/include/spdlog/details/tcp_client.h +++ b/include/spdlog/details/tcp_client.h @@ -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) {