Skip to content

Commit

Permalink
Maintenance: Remove unused fde::flags.close_on_exec (squid-cache#1879)
Browse files Browse the repository at this point in the history
This flag became effectively unused in 2010 commit cfd6652 when
copyFDFlags() -- the only function checking the flag -- became unused.
That unused function was removed a bit later in commit 5ae21d9.
  • Loading branch information
rousskov authored and kinkie committed Oct 12, 2024
1 parent 64499f8 commit d163ba0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
6 changes: 0 additions & 6 deletions src/comm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
}

Expand Down
1 change: 0 additions & 1 deletion src/fde.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d163ba0

Please sign in to comment.