commit 8fdfa36914ea32b7ce124321251fe767c7668e0d
Author: sin <[email protected]>
Date:   Wed Aug 13 23:26:40 2014 +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.

diff --git a/quark.c b/quark.c
index 9a2fd1f..a9d32ec 100644
--- 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 */


Reply via email to