You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by re...@apache.org on 2001/08/20 21:47:52 UTC

cvs commit: httpd-2.0/server/mpm/spmt_os2 spmt_os2.c

rederpj     01/08/20 12:47:52

  Modified:    .        CHANGES
               server/mpm/mpmt_os2 mpmt_os2.c
               server/mpm/prefork prefork.c
               server/mpm/spmt_os2 spmt_os2.c
  Log:
  The prefork and OS/2 MPMs are overwriting the pid file when a second copy
  of httpd is started and shuts down due to socket conflict. Moving the
  call to ap_log_pid solves the problem.
  
  Revision  Changes    Path
  1.319     +4 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.318
  retrieving revision 1.319
  diff -u -r1.318 -r1.319
  --- CHANGES	2001/08/20 19:43:03	1.318
  +++ CHANGES	2001/08/20 19:47:51	1.319
  @@ -1,5 +1,9 @@
   Changes with Apache 2.0.25-dev
   
  +  *) The prefork and OS/2 MPMs are overwriting the pid file when a second copy
  +     of httpd is started and shuts down due to socket conflict. Moving the
  +     call to ap_log_pid solves the problem.
  +
     *) Changed the late-1.3 log_config substitution %c to %X, to log the
        status of the closed connection, as it conflicts with the far more
        common, historical ssl logging directive %...{var}c.  [William Rowe]
  
  
  
  1.5       +2 -1      httpd-2.0/server/mpm/mpmt_os2/mpmt_os2.c
  
  Index: mpmt_os2.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/mpmt_os2/mpmt_os2.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- mpmt_os2.c	2001/08/20 16:10:57	1.4
  +++ mpmt_os2.c	2001/08/20 19:47:52	1.5
  @@ -193,13 +193,14 @@
           /* Parent process */
           char restart;
           is_parent_process = TRUE;
  -        ap_log_pid(pconf, ap_pid_fname);
   
           if (ap_setup_listeners(ap_server_conf) < 1) {
               ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ALERT, 0, s,
                            "no listening sockets available, shutting down");
               return 1;
           }
  +
  +        ap_log_pid(pconf, ap_pid_fname);
   
           restart = master_main();
           ++ap_my_generation;
  
  
  
  1.198     +3 -2      httpd-2.0/server/mpm/prefork/prefork.c
  
  Index: prefork.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/prefork/prefork.c,v
  retrieving revision 1.197
  retrieving revision 1.198
  diff -u -r1.197 -r1.198
  --- prefork.c	2001/08/19 05:48:19	1.197
  +++ prefork.c	2001/08/20 19:47:52	1.198
  @@ -1110,12 +1110,13 @@
   
       ap_server_conf = s;
    
  -    ap_log_pid(pconf, ap_pid_fname);
  -
       if (setup_listeners(s)) {
   	/* XXX: hey, what's the right way for the mpm to indicate a fatal error? */
   	return 1;
       }
  +
  +    ap_log_pid(pconf, ap_pid_fname);
  +
       if ((rv = ap_mpm_pod_open(pconf, &pod))) {
           ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
   		"Could not open pipe-of-death.");
  
  
  
  1.101     +2 -1      httpd-2.0/server/mpm/spmt_os2/spmt_os2.c
  
  Index: spmt_os2.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/spmt_os2/spmt_os2.c,v
  retrieving revision 1.100
  retrieving revision 1.101
  diff -u -r1.100 -r1.101
  --- spmt_os2.c	2001/08/15 21:11:59	1.100
  +++ spmt_os2.c	2001/08/20 19:47:52	1.101
  @@ -926,13 +926,14 @@
   
       pconf = _pconf;
       ap_server_conf = s;
  -    ap_log_pid(pconf, ap_pid_fname);
   
       if ((status = ap_listen_open(s->process, s->port)) != APR_SUCCESS) {
   	ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ALERT, status, s,
   		    "no listening sockets available, shutting down");
   	return -1;
       }
  +
  +    ap_log_pid(pconf, ap_pid_fname);
   
       SAFE_ACCEPT(accept_mutex_init(pconf));