[Sheepdog] [PATCH] sheep: ignore SIGPIPE
MORITA Kazutaka
morita.kazutaka at lab.ntt.co.jp
Fri Apr 8 21:00:11 CEST 2011
Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
sheep/sheep.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/sheep/sheep.c b/sheep/sheep.c
index 5a40888..8755dc4 100644
--- a/sheep/sheep.c
+++ b/sheep/sheep.c
@@ -16,6 +16,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <time.h>
+#include <signal.h>
#include <linux/limits.h>
#include <sys/syslog.h>
@@ -71,6 +72,8 @@ int main(int argc, char **argv)
int log_level = LOG_INFO;
char path[PATH_MAX];
+ signal(SIGPIPE, SIG_IGN);
+
while ((ch = getopt_long(argc, argv, short_options, long_options,
&longindex)) >= 0) {
switch (ch) {
--
1.5.6.5
More information about the sheepdog
mailing list