]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Maintenance: Remove unused fde::flags.close_on_exec (#1879)
authorAlex Rousskov <rousskov@measurement-factory.com>
Wed, 7 Aug 2024 06:56:21 +0000 (06:56 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Wed, 7 Aug 2024 06:56:33 +0000 (06:56 +0000)
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
src/fde.h

index af51538a81a2b66c6d0ff75b2bafe3057f0cb46d..5c8fbd83f15f1c01d5cdd2c16db9ecd710281927 100644 (file)
@@ -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
 }
 
index 61f77d94c2b9f392fff71b0a79a479fd1ac4fa29..7607c99ba0d8d586d8c10ae82dc76ad9131d3f83 100644 (file)
--- a/src/fde.h
+++ b/src/fde.h
@@ -124,7 +124,6 @@ public:
         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