1 --- squid-2.6.STABLE1/configure.fd 2006-07-26 09:58:41.000000000 +0200
2 +++ squid-2.6.STABLE1/configure 2006-07-26 09:58:41.000000000 +0200
9 + USE_FD_CONFIG_FALSE='#'
11 + USE_FD_CONFIG_TRUE='#'
12 + USE_FD_CONFIG_FALSE=
14 +# Check whether --enable-fd-config or --disable-fd-config was given.
15 +if test "${enable_fd_config+set}" = set; then
16 + enableval="$enable_fd_config"
17 + if test "$enableval" = "yes" ; then
18 + echo "File descriptor config enabled"
19 + cat >> confdefs.h <<\EOF
27 + USE_FD_CONFIG_FALSE='#'
29 + USE_FD_CONFIG_TRUE='#'
30 + USE_FD_CONFIG_FALSE=
38 --- squid-2.6.STABLE1/include/autoconf.h.in.fd 2006-07-26 09:58:41.000000000 +0200
39 +++ squid-2.6.STABLE1/include/autoconf.h.in 2006-07-26 09:58:41.000000000 +0200
41 /* Traffic management via "delay pools". */
44 +/* Filedesc managment */
47 /* Enable following X-Forwarded-For headers */
48 #undef FOLLOW_X_FORWARDED_FOR
50 --- squid-2.6.STABLE1/configure.in.fd 2006-07-26 09:58:41.000000000 +0200
51 +++ squid-2.6.STABLE1/configure.in 2006-07-26 09:58:41.000000000 +0200
56 +AM_CONDITIONAL(USE_FD_CONFIG, false)
57 +AC_ARG_ENABLE(fd-config,
58 +[ --enable-fd-config Enable filedesc config to configure maximal number of used filedescriptors],
59 +[ if test "$enableval" = "yes" ; then
60 + echo "Filedesc config enabled"
61 + AC_DEFINE(FD_CONFIG, 1, [Maximum number of open file descriptors])
62 + AM_CONDITIONAL(USE_FD_CONFIG, true)
66 dnl This is a developer only option. Developers know how to set defines
68 dnl AC_ARG_ENABLE(mem-gen-trace,
69 --- squid-2.6.STABLE1/src/cf.data.pre.fd 2006-07-26 09:58:41.000000000 +0200
70 +++ squid-2.6.STABLE1/src/cf.data.pre 2006-07-26 10:05:54.000000000 +0200
71 @@ -5027,4 +5027,23 @@
72 or response to be rejected.
79 +LOC: Config.max_filedesc
81 + The maximum number of open file descriptors.
83 + WARNING: Changes of this value isn't respected by reconfigure
84 + command. This value should be changed only if there isn't
85 + any active squid process.
87 + NOTE: This option is only supported by system with poll()
88 + or epoll(). You can set this value by --with-maxfd during
89 + compilation on system whith uses select().
91 + The maximum value for max_filedesc is set by --with-maxfd during
95 --- squid-2.6.STABLE1/src/main.c.fd 2006-07-26 09:58:41.000000000 +0200
96 +++ squid-2.6.STABLE1/src/main.c 2006-07-26 09:58:41.000000000 +0200
98 /* Make sure the OS allows core dumps if enabled in squid.conf */
112 /* init comm module */
114 --- squid-2.6.STABLE1/src/structs.h.fd 2006-07-26 09:58:41.000000000 +0200
115 +++ squid-2.6.STABLE1/src/structs.h 2006-07-26 09:58:41.000000000 +0200
118 time_t refresh_stale_window;
125 struct _SquidConfig2 {
126 --- squid-2.6.STABLE1/src/tools.c.fd 2006-07-26 09:58:41.000000000 +0200
127 +++ squid-2.6.STABLE1/src/tools.c 2006-07-26 09:58:41.000000000 +0200
133 +/* Set up number of used filedescriptors from config file */
134 +/* Override the default settings Squid_MaxFD = FD_SETSIZE */
136 + Squid_MaxFD = Config.max_filedesc;
138 + /* don't exceed limit which was set during compilation */
139 + if(SQUID_MAXFD < Squid_MaxFD)
140 + Squid_MaxFD = SQUID_MAXFD;
142 + /* don't exceed FD_SETSIZE */
143 + if(FD_SETSIZE < Squid_MaxFD)
144 + Squid_MaxFD = FD_SETSIZE;
148 /* try to use as many file descriptors as possible */
149 /* System V uses RLIMIT_NOFILE and BSD uses RLIMIT_OFILE */