From 7333e1e290962bbaaf8ff960f0c9c46a44ada85c Mon Sep 17 00:00:00 2001 From: Henning Brauer Date: Fri, 9 Jan 2004 13:38:40 +0000 Subject: we must ignore SIGPIPE. we do notice closed pipes just fine, tho there was at least one case where we tried a write without POLLOUT and that got us a SIGPIPE before our pipe closed detection catched it. ok claudio@ --- usr.sbin/bgpd/session.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c index eed0ade8209..1bb6355c5f6 100644 --- a/usr.sbin/bgpd/session.c +++ b/usr.sbin/bgpd/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.74 2004/01/07 01:41:49 henning Exp $ */ +/* $OpenBSD: session.c,v 1.75 2004/01/09 13:38:39 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -173,6 +173,7 @@ session_main(struct bgpd_config *config, struct peer *cpeers, int pipe_m2s[2], endpwent(); signal(SIGTERM, session_sighdlr); + signal(SIGPIPE, SIG_IGN); logit(LOG_INFO, "session engine ready"); close(pipe_m2s[0]); close(pipe_s2r[1]); -- cgit v1.2.3