/[svn]/ircd-hybrid-7.2/src/ircd_signal.c
ViewVC logotype

Diff of /ircd-hybrid-7.2/src/ircd_signal.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 593 by lusky, Sun Oct 2 21:05:51 2005 UTC revision 594 by michael, Fri May 12 20:05:57 2006 UTC
# Line 26  Line 26 
26  #include "common.h"  #include "common.h"
27  #include "ircd_signal.h"  #include "ircd_signal.h"
28  #include "ircd.h"         /* dorehash */  #include "ircd.h"         /* dorehash */
29  #include "restart.h"      /* server_reboot */  #include "restart.h"      /* server_die */
30  #include "s_log.h"  #include "s_log.h"
31  #include "memory.h"  #include "memory.h"
32  #include "s_bsd.h"  #include "s_bsd.h"
# Line 78  sigchld_handler(int sig) Line 78  sigchld_handler(int sig)
78  static void  static void
79  sigint_handler(int sig)  sigint_handler(int sig)
80  {  {
81    if (server_state.foreground)    server_die("SIGINT received", !server_state.foreground);
     server_die("SIGINT received", NO);  
   else  
     restart("SIGINT received");  
82  }  }
83    
84  /*  /*
# Line 94  setup_signals(void) Line 91  setup_signals(void)
91    
92    act.sa_flags = 0;    act.sa_flags = 0;
93    act.sa_handler = SIG_IGN;    act.sa_handler = SIG_IGN;
94    
95    sigemptyset(&act.sa_mask);    sigemptyset(&act.sa_mask);
96    sigaddset(&act.sa_mask, SIGPIPE);    sigaddset(&act.sa_mask, SIGPIPE);
97    sigaddset(&act.sa_mask, SIGALRM);    sigaddset(&act.sa_mask, SIGALRM);
98  #ifdef SIGTRAP  #ifdef SIGTRAP
99    sigaddset(&act.sa_mask, SIGTRAP);    sigaddset(&act.sa_mask, SIGTRAP);
100  #endif  #endif
101    #ifdef SIGXFSZ
102      sigaddset(&act.sa_mask, SIGXFSZ);
103      sigaction(SIGXFSZ, &act, 0);
104    #endif
105    
106  #ifdef SIGWINCH  #ifdef SIGWINCH
107    sigaddset(&act.sa_mask, SIGWINCH);    sigaddset(&act.sa_mask, SIGWINCH);

Legend:
Removed from v.593  
changed lines
  Added in v.594

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28