From d163ba01645ca90c41a20c75dc142bca5445a721 Mon Sep 17 00:00:00 2001 From: Alex Rousskov Date: Wed, 7 Aug 2024 06:56:21 +0000 Subject: [PATCH] Maintenance: Remove unused fde::flags.close_on_exec (#1879) This flag became effectively unused in 2010 commit cfd66529 when copyFDFlags() -- the only function checking the flag -- became unused. That unused function was removed a bit later in commit 5ae21d99. --- src/comm.cc | 6 ------ src/fde.h | 1 - 2 files changed, 7 deletions(-) diff --git a/src/comm.cc b/src/comm.cc index af51538a81a..5c8fbd83f15 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -555,9 +555,6 @@ comm_import_opened(const Comm::ConnectionPointer &conn, comm_init_opened(conn, note, AI); - if (!(conn->flags & COMM_NOCLOEXEC)) - fd_table[conn->fd].flags.close_on_exec = true; - if (conn->local.port() > (unsigned short) 0) { #if _SQUID_WINDOWS_ if (AI->ai_socktype != SOCK_DGRAM) @@ -1146,9 +1143,6 @@ commSetCloseOnExec(int fd) int xerrno = errno; debugs(50, DBG_CRITICAL, "ERROR: " << MYNAME << "FD " << fd << ": set close-on-exec failed: " << xstrerr(xerrno)); } - - fd_table[fd].flags.close_on_exec = true; - #endif } diff --git a/src/fde.h b/src/fde.h index 61f77d94c2b..7607c99ba0d 100644 --- a/src/fde.h +++ b/src/fde.h @@ -124,7 +124,6 @@ class fde bool ipc = false; bool called_connect = false; bool nodelay = false; - bool close_on_exec = false; /// buffering readMethod_ has data to give (regardless of socket state) bool read_pending = false; //bool write_pending; //XXX seems not to be used