httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Behlendorf <br...@hyperreal.com>
Subject cvs commit: apache/src http_main.c
Date Fri, 24 Jan 1997 21:06:38 GMT
brian       97/01/24 13:06:37

  Modified:    src       http_main.c
  Log:
  Reviewed by:	Brian Behlendorf, Randy Terbush, Roy T. Fielding
  Submitted by:	mgyger@itr.ch, Adrian Filipi-Martin <adrian@virginia.edu>
  
  > Adrian Filipi-Martin <adrian@virginia.edu> writes:
  > When starting httpd or restarting it with a SIGHUP, the following is logged
  > to the error_log:
  >
  > [Wed Jan  8 14:21:03 1997] created shared memory segment #4206
  > [Wed Jan  8 14:21:03 1997] sigaction(SIGSEGV): Invalid argument
  > [Wed Jan  8 14:21:03 1997] sigaction(SIGBUS): Invalid argument
  > [Wed Jan  8 14:21:03 1997] Server configured -- resuming normal operations
  >
  > (Note that the shared memory segment message is only present when the daemon
  > is send a SIGHUP signal to restart it.)
  >
  > These error messages do not appear to have any real effect upon the operation
  > of the server.  I expect they would not matter until it has either a bus or
  > a segment fault.
  >
  > In any case, I looked at the source with gdb and the fact that a sigaction
  > structure is not initialized completely in http_main.c seems to be the culprit.
  > In any case a small patch is included below that does the required clearing of
  > the sigaction structure and fixes the problem
  
  Revision  Changes    Path
  1.110     +1 -1      apache/src/http_main.c
  
  Index: http_main.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/http_main.c,v
  retrieving revision 1.109
  retrieving revision 1.110
  diff -C3 -r1.109 -r1.110
  *** http_main.c	1997/01/24 02:49:57	1.109
  --- http_main.c	1997/01/24 21:06:33	1.110
  ***************
  *** 1303,1308 ****
  --- 1303,1309 ----
    {
    #ifndef NO_USE_SIGACTION
        struct sigaction sa;
  +     memset(&sa,0,sizeof sa);
    
        if (!one_process) {
    	sa.sa_handler = (void (*)())seg_fault;
  ***************
  *** 1314,1320 ****
        }
        /* USE WITH EXTREME CAUTION. Graceful restarts are known to break */
        /*  problems will be dealt with in a future release */
  -     memset(&sa,0,sizeof sa);
        sa.sa_handler=(void (*)())sig_term;
        if(sigaction(SIGTERM,&sa,NULL) < 0)
    	log_unixerr("sigaction(SIGTERM)", NULL, NULL, server_conf);
  --- 1315,1320 ----
  
  
  

Mime
View raw message