26 |
|
#include "common.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" |
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 |
|
/* |
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 |
|
#ifdef SIGTRAP |
99 |
|
sigaddset(&act.sa_mask, SIGTRAP); |
100 |
|
#endif |
101 |
+ |
#ifdef SIGXFSZ |
102 |
+ |
sigaddset(&act.sa_mask, SIGXFSZ); |
103 |
+ |
sigaction(SIGXFSZ, &act, 0); |
104 |
+ |
#endif |
105 |
|
|
106 |
|
#ifdef SIGWINCH |
107 |
|
sigaddset(&act.sa_mask, SIGWINCH); |