mirror of
https://github.com/anope/anope.git
synced 2026-07-05 20:23:11 +02:00
Ignore SIGPIPE
This commit is contained in:
@@ -217,6 +217,14 @@ class SignalExit : public Signal
|
||||
}
|
||||
};
|
||||
|
||||
class SignalNothing : public Signal
|
||||
{
|
||||
public:
|
||||
SignalNothing(int sig) : Signal(sig) { }
|
||||
|
||||
void OnSignal() { }
|
||||
};
|
||||
|
||||
void Init(int ac, char **av)
|
||||
{
|
||||
int started_from_term = isatty(0) && isatty(1) && isatty(2);
|
||||
@@ -385,6 +393,7 @@ void Init(int ac, char **av)
|
||||
|
||||
static SignalReload sig_hup(SIGHUP);
|
||||
static SignalExit sig_term(SIGTERM), sig_int(SIGINT);
|
||||
static SignalNothing sig_pipe(SIGPIPE);
|
||||
|
||||
/* Initialize multi-language support */
|
||||
Log(LOG_DEBUG) << "Loading Languages...";
|
||||
|
||||
@@ -13,6 +13,9 @@
|
||||
#ifndef SIGHUP
|
||||
# define SIGHUP -1
|
||||
#endif
|
||||
#ifndef SIGPIPE
|
||||
# define SIGPIPE -1
|
||||
#endif
|
||||
|
||||
struct sigaction
|
||||
{
|
||||
@@ -22,4 +25,4 @@
|
||||
};
|
||||
|
||||
extern int sigaction(int, struct sigaction *, struct sigaction *);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user