Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: CVS

cvs commit: apache/src http_main.c

 

 

Apache cvs RSS feed   Index | Next | Previous | View Threaded


jim at hyperreal

May 12, 1996, 3:30 PM

Post #1 of 1 (62 views)
Permalink
cvs commit: apache/src http_main.c

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
}

/*****************************************************************

Apache cvs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.