httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chuck Murcko <ch...@hyperreal.com>
Subject cvs commit: apache/src http_main.c
Date Fri, 07 Jun 1996 19:51:19 GMT
chuck       96/06/07 12:51:18

  Modified:    src       http_main.c
  Log:
  Reviewed by:	Chuck Murcko
  Submitted by:	Cliff Skolnick
  Obtained from:  jk@tools.de
  When the server listens to multiple ports (via
  the httpd.conf 'Listen <port>' directive), a
  SIGHUP sent to the main server doesn't call
  reclaim_child_processes.  The status of the killed
  child processes is collected much later, after the
  server is fully restarted.  Also an error log
  entry for the SIGHUP is missing in logs/error_log.
  
  Revision  Changes    Path
  1.33      +7 -4      apache/src/http_main.c
  
  Index: http_main.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/http_main.c,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -C3 -r1.32 -r1.33
  *** http_main.c	1996/06/07 17:39:24	1.32
  --- http_main.c	1996/06/07 19:51:16	1.33
  ***************
  *** 1341,1347 ****
        struct sockaddr_in sa_server;
    
        standalone = 1;
  !     sd = -1;
        
        if (!one_process) detach(); 
        
  --- 1341,1347 ----
        struct sockaddr_in sa_server;
    
        standalone = 1;
  !     sd = listenmaxfd = -1;
        
        if (!one_process) detach(); 
        
  ***************
  *** 1354,1366 ****
        signal (SIGHUP, SIG_IGN);	/* Until we're done (re)reading config */
        
        if(!one_process)
    #ifndef NO_KILLPG
  !       killpg(pgrp,SIGHUP);	/* Kill 'em off */
    #else
  !       kill(-pgrp,SIGHUP);
    #endif
        
  !     if (sd != -1) {
    	reclaim_child_processes(); /* Not when just starting up */
    	log_error ("SIGHUP received.  Attempting to restart", server_conf);
        }
  --- 1354,1369 ----
        signal (SIGHUP, SIG_IGN);	/* Until we're done (re)reading config */
        
        if(!one_process)
  +     {
    #ifndef NO_KILLPG
  !       if (killpg(pgrp,SIGHUP) < 0)    /* Kill 'em off */
    #else
  !       if (kill(-pgrp,SIGHUP) < 0)
    #endif
  +         log_unixerr ("killpg SIGHUP", NULL, NULL, server_conf);
  +     }
        
  !     if (sd != -1 || listenmaxfd != -1) {
    	reclaim_child_processes(); /* Not when just starting up */
    	log_error ("SIGHUP received.  Attempting to restart", server_conf);
        }
  
  
  

Mime
View raw message