You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jim Jagielski <ji...@jaguNET.com> on 1997/12/12 21:58:34 UTC
[PATCH] OPTIMIZE_TIMEOUTS doesn't set child usage timestamp
Let's make it official.
With OPTIMIZE_TIMEOUT defined, the "child last used" timestamp
isn't set correctly. This should fix.
Index: src/main/http_main.c
===================================================================
RCS file: /export/home/cvs/apachen/src/main/http_main.c,v
retrieving revision 1.253
diff -u -r1.253 http_main.c
--- http_main.c 1997/11/22 02:04:44 1.253
+++ http_main.c 1997/12/12 20:56:56
@@ -3181,7 +3181,7 @@
++total_non_dead;
last_non_dead = i;
#ifdef OPTIMIZE_TIMEOUTS
- if (ss->timeout_len) {
+ if (ss->timeout_len || child_timeouts) {
/* if it's a live server, with a live timeout then
* start checking its timeout */
parent_score *ps = &scoreboard_image->parent[i];
@@ -3191,7 +3191,8 @@
ps->last_rtime = now;
ps->last_vtime = ss->cur_vtime;
}
- else if (ps->last_rtime + ss->timeout_len < now) {
+ else if (ps->last_rtime + ss->timeout_len < now
+ && !child_timeouts) {
/* no progress, and the timeout length has been exceeded */
ss->timeout_len = 0;
kill(ps->pid, SIGALRM);
--
====================================================================
Jim Jagielski | jaguNET Access Services
jim@jaguNET.com | http://www.jaguNET.com/
"Look at me! I'm wearing a cardboard belt!"
Re: [PATCH] OPTIMIZE_TIMEOUTS doesn't set child usage timestamp
Posted by Dean Gaudet <dg...@arctic.org>.
Oh god. I goofed. Your patch isn't needed. The bug is the value of
child_timeouts. Try this patch instead.
Dean
Index: http_main.c
===================================================================
RCS file: /export/home/cvs/apachen/src/main/http_main.c,v
retrieving revision 1.256
diff -u -r1.256 http_main.c
--- http_main.c 1997/12/12 08:09:19 1.256
+++ http_main.c 1997/12/13 08:00:35
@@ -3557,7 +3557,7 @@
suexec_enabled = init_suexec();
server_conf = read_config(pconf, ptrans, server_confname);
- child_timeouts = standalone || one_process;
+ child_timeouts = !standalone || one_process;
if (standalone) {
open_logs(server_conf, pconf);