summaryrefslogtreecommitdiffstats
path: root/net/djbdns/patches/270-dnscache-sigpipe-fix.patch
blob: 17a739a3e82b9be3b3da7ac7b4f006477a35e3cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--- a/dnscache.c
+++ b/dnscache.c
@@ -1,4 +1,5 @@
 #include <unistd.h>
+#include <signal.h>
 #include "env.h"
 #include "exit.h"
 #include "scan.h"
@@ -391,6 +392,7 @@ int main()
   char *x;
   unsigned long cachesize;
 
+  signal(SIGPIPE, SIG_IGN);
   x = env_get("IP");
   if (!x)
     strerr_die2x(111,FATAL,"$IP not set");