summaryrefslogtreecommitdiff
path: root/gnu/usr.sbin
diff options
context:
space:
mode:
authorBill Paul <wpaul@FreeBSD.org>1995-07-04 21:58:38 +0000
committerBill Paul <wpaul@FreeBSD.org>1995-07-04 21:58:38 +0000
commit3f95a88ec7853bdb1de718e53e0b6db79a07f97c (patch)
tree74026c69196578756a98d88e5fb356a99a9646de /gnu/usr.sbin
parentcbc6d18d9fc8cd06271cc5671414b9349935afd7 (diff)
Notes
Diffstat (limited to 'gnu/usr.sbin')
-rw-r--r--gnu/usr.sbin/ypserv/yp_svc.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gnu/usr.sbin/ypserv/yp_svc.c b/gnu/usr.sbin/ypserv/yp_svc.c
index b4ce7494cb22..8abb3499f3d7 100644
--- a/gnu/usr.sbin/ypserv/yp_svc.c
+++ b/gnu/usr.sbin/ypserv/yp_svc.c
@@ -6,7 +6,7 @@
* And thus replied Lpd@NannyMUD:
* Who cares? :-) /Peter Eriksson <pen@signum.se>
*
- * $Id: yp_svc.c,v 1.2 1995/04/05 03:23:38 wpaul Exp $
+ * $Id: yp_svc.c,v 1.3 1995/05/30 05:05:37 rgrimes Exp $
*/
#include "system.h"
@@ -23,6 +23,7 @@
#include <syslog.h>
#include <errno.h>
#include <paths.h>
+#include <signal.h>
extern int errno;
extern void Perror();
@@ -314,6 +315,12 @@ int main(int argc, char **argv)
exit(1);
}
+ /*
+ * Ignore SIGPIPEs. They can hurt us is someone does a ypcat
+ * and then hits CTRL-C before it terminales.
+ */
+ signal(SIGPIPE, SIG_IGN);
+
(void) pmap_unset(YPPROG, YPVERS);
if (sunos_4_kludge)
(void) pmap_unset(YPPROG, 1);