commit 8fdfa36914ea32b7ce124321251fe767c7668e0d
parent 5d20e3dc27b27af3f5d582c87ba82c30a9163e98
Author: sin <sin@2f30.org>
Date: Wed, 13 Aug 2014 23:26:40 +0100
Ignore SIGPIPE
If there's no reading end (client closed connection) and quark
tries to write to the socket, it will get a SIGPIPE. Just ignore it.
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/quark.c b/quark.c
@@ -531,6 +531,7 @@ main(int argc, char *argv[]) {
signal(SIGQUIT, sighandler);
signal(SIGABRT, sighandler);
signal(SIGTERM, sighandler);
+ signal(SIGPIPE, SIG_IGN);
/* init */
setbuf(stdout, NULL); /* unbuffered stdout */