[hackers] [quark] Ignore SIGPIPE || sin

From: <git_AT_suckless.org>
Date: Thu, 14 Aug 2014 09:55:17 +0200

commit 8fdfa36914ea32b7ce124321251fe767c7668e0d
Author: sin <sin_AT_2f30.org>
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
_AT_@ -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 */
Received on Thu Aug 14 2014 - 09:55:17 CEST

This archive was generated by hypermail 2.3.0 : Thu Aug 14 2014 - 10:00:15 CEST