You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by st...@apache.org on 2001/11/26 18:26:55 UTC

cvs commit: apache-1.3/src/main http_main.c

stoddard    01/11/26 09:26:54

  Modified:    src      CHANGES
               src/main http_main.c
  Log:
  Win32: Do not continue to handle keepalive requests if the server process
  is in the process of shutting down.
  
  Revision  Changes    Path
  1.1742    +4 -3      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1741
  retrieving revision 1.1742
  diff -u -r1.1741 -r1.1742
  --- CHANGES	2001/11/16 18:15:16	1.1741
  +++ CHANGES	2001/11/26 17:26:53	1.1742
  @@ -1,8 +1,9 @@
  -Changes with Apache 1.3.24
  +Changes with Apache 1.3.23
  +  *) Win32: Do not allow threads to continue handling keepalive
  +     requests after a shutdown or restart has ben signaled.
  +     [Bill Stoddard]
   
     *) Win32: Accept OPTIONS * requests.  [Keith Wannamaker]
  -
  -Changes with Apache 1.3.23
   
     *) Unixware 7.0 and later did not have a default locking
        mechanism defined.  This bug was introduced in apache 1.3.4.
  
  
  
  1.562     +10 -3     apache-1.3/src/main/http_main.c
  
  Index: http_main.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/http_main.c,v
  retrieving revision 1.561
  retrieving revision 1.562
  diff -u -r1.561 -r1.562
  --- http_main.c	2001/11/16 01:32:20	1.561
  +++ http_main.c	2001/11/26 17:26:54	1.562
  @@ -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 */