httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@hyperreal.com>
Subject cvs commit: apache/src http_main.c
Date Sun, 12 May 1996 22:30:57 GMT
jim         96/05/12 15:30:57

  Modified:    src       http_main.c
  Log:
  Use sigaction if desired; feel free to change the #define
  
  Revision  Changes    Path
  1.26      +16 -4     apache/src/http_main.c
  
  Index: http_main.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/http_main.c,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -C3 -r1.25 -r1.26
  *** http_main.c	1996/05/07 18:29:34	1.25
  --- http_main.c	1996/05/12 22:30:54	1.26
  ***************
  *** 963,975 ****
    }
    
    void set_signals() {
  ! 	if(!one_process)
  ! 	{
  ! 	    signal(SIGSEGV,(void (*)())seg_fault);
        	signal(SIGBUS,(void (*)())bus_error);
  ! 	}
        signal(SIGTERM,(void (*)())sig_term);
        signal(SIGHUP,(void (*)())restart);
    }
    
    /*****************************************************************
  --- 963,987 ----
    }
    
    void set_signals() {
  ! #ifndef NO_USE_SIGACTION
  !     struct sigaction sa;
  ! #endif
  !     if(!one_process) {
  ! 	signal(SIGSEGV,(void (*)())seg_fault);
        	signal(SIGBUS,(void (*)())bus_error);
  !     }
  ! #ifdef NO_USE_SIGACTION
        signal(SIGTERM,(void (*)())sig_term);
        signal(SIGHUP,(void (*)())restart);
  + #else
  +     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);
  +     sa.sa_handler=(void (*)())restart;
  +     if(sigaction(SIGHUP,&sa,NULL) < 0)
  + 	log_unixerr("sigaction(SIGHUP)", NULL, NULL, server_conf);
  + #endif
    }
    
    /*****************************************************************
  
  
  

Mime
View raw message