#
-# $Id: cf.data.pre,v 1.224 2001/08/19 16:33:17 wessels Exp $
+# $Id: cf.data.pre,v 1.225 2001/09/27 21:59:22 hno Exp $
#
#
# SQUID Web Proxy Cache http://www.squid-cache.org/
objects not intended for caching to get cached.
DOC_END
+NAME: sleep_after_fork
+COMMENT: (microseconds)
+TYPE: int
+LOC: Config.sleep_after_fork
+DEFAULT: 0
+DOC_START
+ When this is set to a non-zero value, the main Squid process
+ sleeps the specified number of microseconds after a fork()
+ system call. This sleep may help the situation where your
+ system reports fork() failures due to lack of (virtual)
+ memory. Note, however, that if you have a lot of child
+ processes, then these sleep delays will add up and your
+ Squid will not service requests for some amount of time
+ until all the child processes have been started.
+DOC_END
+
EOF
/*
- * $Id: ipc.cc,v 1.23 2001/08/29 14:57:35 robertc Exp $
+ * $Id: ipc.cc,v 1.24 2001/09/27 21:59:22 hno Exp $
*
* DEBUG: section 54 Interprocess Communication
* AUTHOR: Duane Wessels
*wfd = pwfd;
fd_table[prfd].flags.ipc = 1;
fd_table[pwfd].flags.ipc = 1;
+ if (Config.sleep_after_fork) {
+ /* XXX emulation of usleep() */
+ struct timeval sl;
+ sl.tv_sec = Config.sleep_after_fork / 1000000;
+ sl.tv_usec = Config.sleep_after_fork % 1000000;
+ select(0, NULL, NULL, NULL, &sl);
+ }
return pid;
}
/* child */
/*
- * $Id: structs.h,v 1.399 2001/09/07 18:02:48 adrian Exp $
+ * $Id: structs.h,v 1.400 2001/09/27 21:59:22 hno Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
size_t high_memory;
} warnings;
char *store_dir_select_algorithm;
+ int sleep_after_fork; /* microseconds */
};
struct _SquidConfig2 {