ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/ircd_signal.c
(Generate patch)

Comparing ircd-hybrid/src/ircd_signal.c (file contents):
Revision 32 by knight, Sun Oct 2 20:41:23 2005 UTC vs.
Revision 1028 by michael, Sun Nov 8 13:03:38 2009 UTC

# Line 23 | Line 23
23   */
24  
25   #include "stdinc.h"
26 < #include "common.h"
26 > #include "list.h"
27   #include "ircd_signal.h"
28   #include "ircd.h"         /* dorehash */
29 < #include "restart.h"      /* server_reboot */
29 > #include "restart.h"      /* server_die */
30   #include "s_log.h"
31   #include "memory.h"
32   #include "s_bsd.h"
# Line 37 | Line 37
37   static void
38   sigterm_handler(int sig)  
39   {
40 <  server_die("received signal SIGTERM", NO);
40 >  server_die("received signal SIGTERM", 0);
41   }
42  
43   /*
# Line 78 | Line 78 | sigchld_handler(int sig)
78   static void
79   sigint_handler(int sig)
80   {
81 <  if (server_state.foreground)
82 <    server_die("SIGINT received", NO);
83 <  else
84 <    restart("SIGINT received");
81 >  server_die("SIGINT received", !server_state.foreground);
82   }
83  
84   /*
# Line 94 | Line 91 | setup_signals(void)
91  
92    act.sa_flags = 0;
93    act.sa_handler = SIG_IGN;
94 +
95    sigemptyset(&act.sa_mask);
96    sigaddset(&act.sa_mask, SIGPIPE);
97    sigaddset(&act.sa_mask, SIGALRM);
98 +  sigaction(SIGALRM, &act, 0);
99   #ifdef SIGTRAP
100    sigaddset(&act.sa_mask, SIGTRAP);
101   #endif
102 + #ifdef SIGXFSZ
103 +  sigaddset(&act.sa_mask, SIGXFSZ);
104 +  sigaction(SIGXFSZ, &act, 0);
105 + #endif
106  
107   #ifdef SIGWINCH
108    sigaddset(&act.sa_mask, SIGWINCH);

Comparing ircd-hybrid/src/ircd_signal.c (property svn:keywords):
Revision 32 by knight, Sun Oct 2 20:41:23 2005 UTC vs.
Revision 1028 by michael, Sun Nov 8 13:03:38 2009 UTC

# Line 1 | Line 1
1 < Revision
1 > Id Revision

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)