Commit Diff
Diff:
1138a28ac754520872cc50d74a726b42eaa6d5ef
b6b96cfd7986f47f86aac38ac4a887c26d865a66
Commit:
b6b96cfd7986f47f86aac38ac4a887c26d865a66
Tree:
af4b10532e9b063308f0c2ecf2701b9b7f6399c1
Author:
pbug <pbug@delphinusdns.org>
Committer:
pbug <pbug@delphinusdns.org>
Date:
Mon Mar 22 14:45:14 2010 UTC
Message:
* now that we do TCP, ignore the PIPE signal as if I recall correctly the sockets peer can hang up before we send return data.
blob - ba057fe2148a67699132ab35797c9f36783805eb
blob + d6e10a3a821c39377ceac204ac879d1fc273d171
--- include.h
+++ include.h
@@ -53,6 +53,7 @@
#include <pwd.h>
#include <ifaddrs.h>
#include <dirent.h>
+#include <signal.h>
#ifndef NTOHS
#include "endian.h"
blob - 39b75fbad82e0e70443a17607790f356ba711ad7
blob + 790bce02cc7c565c15a1e72d5e34ffcda96b1fe2
--- main.c
+++ main.c
@@ -103,7 +103,7 @@ struct tcps {
} *tn1, *tn2, *tnp;
-static const char rcsid[] = "$Id: main.c,v 1.42 2010/03/19 17:49:58 pbug Exp $";
+static const char rcsid[] = "$Id: main.c,v 1.43 2010/03/22 14:45:21 pbug Exp $";
/*
* MAIN - set up arguments, set up database, set up sockets, call mainloop
@@ -427,6 +427,12 @@ main(int argc, char *argv[])
}
#endif
+
+ /*
+ * ignore SIGPIPE signal
+ */
+
+ signal(SIGPIPE, SIG_IGN);
/*
* I open the log again after the chroot just in case I can't
repomaster@centroid.eu