From: Amos Jeffries Date: Sat, 31 Jul 2010 14:27:50 +0000 (-0600) Subject: Author: Matthias Pitzl X-Git-Tag: SQUID_3_1_6~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4eb684787cf4ca062dad57c5a88962ac78f8d9a7;p=thirdparty%2Fsquid.git Author: Matthias Pitzl Bug 2991: Wrong parameters to fcntl() in commSetCloseOnExec() --- diff --git a/src/comm.cc b/src/comm.cc index 4937bb2874..b5e927f5f3 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -1878,8 +1878,8 @@ commSetCloseOnExec(int fd) int flags; int dummy = 0; - if ((flags = fcntl(fd, F_GETFL, dummy)) < 0) { - debugs(50, 0, "FD " << fd << ": fcntl F_GETFL: " << xstrerror()); + if ((flags = fcntl(fd, F_GETFD, dummy)) < 0) { + debugs(50, 0, "FD " << fd << ": fcntl F_GETFD: " << xstrerror()); return; }