diff options
author | Adam <Adam@anope.org> | 2011-08-10 15:50:45 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-08-10 15:50:45 -0400 |
commit | 3755bf5bcd3d527739316c13100cf579126f1027 (patch) | |
tree | b99cf7655d585f407a648b1673c865a0c5ddfee9 /src | |
parent | 25d422d32bd72a812b52ad27180b033c75b1ddc6 (diff) |
Ignore SIGPIPE
Diffstat (limited to 'src')
-rw-r--r-- | src/init.cpp | 9 | ||||
-rw-r--r-- | src/win32/sigaction/sigaction.h | 5 |
2 files changed, 13 insertions, 1 deletions
diff --git a/src/init.cpp b/src/init.cpp index d02be3eb6..ea0b6c503 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -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..."; diff --git a/src/win32/sigaction/sigaction.h b/src/win32/sigaction/sigaction.h index 87fd17992..366965f8b 100644 --- a/src/win32/sigaction/sigaction.h +++ b/src/win32/sigaction/sigaction.h @@ -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 *);
-
\ No newline at end of file +
|