Return-Path: Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 58957 invoked by uid 500); 19 Nov 2001 16:05:02 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 58946 invoked from network); 19 Nov 2001 16:05:02 -0000 Message-ID: <00b101c17114$1cea5b50$bc381b09@sashimi> From: "Bill Stoddard" To: References: <000701c17021$877b4900$6501a8c0@apache> <029c01c17112$81d31950$94c0b0d0@v505> Subject: Re: [PATCH] Apache Win32 restart (fix loosing keep-alive POST requests across a restart) Date: Mon, 19 Nov 2001 11:06:08 -0500 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_00AE_01C170EA.30B68250" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. ------=_NextPart_000_00AE_01C170EA.30B68250 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Here it is... > Doesn't apply to head... are you debugging/testing against the current CVS? > Or perhaps it was munged... could you repost as an attachment? > > ----- Original Message ----- > From: "Bill Stoddard" > To: > Sent: Sunday, November 18, 2001 5:09 AM > Subject: [PATCH] Apache Win32 restart (fix loosing keep-alive POST requests across a restart) > > > > Bill, > > Check out this patch for the problem with loosing POST requests across a restart. > > ------=_NextPart_000_00AE_01C170EA.30B68250 Content-Type: application/octet-stream; name="http_main.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="http_main.patch" Index: http_main.c =================================================================== RCS file: /home/cvs/apache-1.3/src/main/http_main.c,v retrieving revision 1.561 diff -u -r1.561 http_main.c --- http_main.c 2001/11/16 01:32:20 1.561 +++ http_main.c 2001/11/19 15:48:08 @@ -5839,7 +5839,14 @@ increment_counts(child_num, r); if (!current_conn->keepalive || current_conn->aborted) break; - + /* If the server is shutting down, do not allow anymore requests + * to be handled on the keepalive connection. Leave the thread + * alive to drain the job queue. This check is particularly + * important on the threaded server to allow the process to be + * quickly taken down cleanly. + */ + if (allowed_globals.exit_now) + break; ap_destroy_pool(r->pool); (void) ap_update_child_status(child_num, SERVER_BUSY_KEEPALIVE, (request_rec *) NULL); @@ -6203,7 +6210,7 @@ add_job(csd); } } - + APD2("process PID %d exiting", my_pid); /* Get ready to shutdown and exit */ @@ -6421,7 +6428,7 @@ total_jobs++; } } - + APD2("process PID %d exiting", my_pid); /* Get ready to shutdown and exit */ ------=_NextPart_000_00AE_01C170EA.30B68250--