[hackers] [wmii] Ensure default sigpipe handler in wmiir. Fixes issue #160. || Kris Maglione

From: <hg_AT_suckless.org>
Date: Fri, 28 May 2010 04:29:53 +0000 (UTC)

changeset: 2663:d6c3a661b1ab
tag: tip
user: Kris Maglione <kris_AT_suckless.org>
date: Fri May 28 00:29:31 2010 -0400
files: cmd/wmiir.c
description:
Ensure default sigpipe handler in wmiir. Fixes issue #160.

diff -r 7c6dc01d4d1d -r d6c3a661b1ab cmd/wmiir.c
--- a/cmd/wmiir.c Thu May 27 22:10:14 2010 -0400
+++ b/cmd/wmiir.c Fri May 28 00:29:31 2010 -0400
@@ -5,6 +5,7 @@
 #define IXP_P9_STRUCTS
 #include <stdio.h>
 #include <string.h>
+#include <sys/signal.h>
 #include <time.h>
 #include <unistd.h>
 #include <ixp.h>
@@ -407,6 +408,8 @@
         if(client == nil)
                 fatal("can't mount: %r\n");
 
+ signal(SIGPIPE, SIG_DFL);
+
         for(tab=fstab; tab->cmd; tab++)
                 if(strcmp(*argv, tab->cmd) == 0) break;
         if(tab->cmd == 0)
Received on Fri May 28 2010 - 04:29:53 UTC

This archive was generated by hypermail 2.2.0 : Fri May 28 2010 - 04:36:04 UTC