summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhenning <henning@openbsd.org>2004-01-09 13:38:39 +0000
committerhenning <henning@openbsd.org>2004-01-09 13:38:39 +0000
commit949844a3c2835f94396fd38aa8b4714d2b1870fd (patch)
tree865574158b295f88f6cdb24336e0f856856b687d
parentyou must not try to read(2) without checking (pfd->revents & POLLIN) (diff)
downloadwireguard-openbsd-949844a3c2835f94396fd38aa8b4714d2b1870fd.tar.xz
wireguard-openbsd-949844a3c2835f94396fd38aa8b4714d2b1870fd.zip
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@
-rw-r--r--usr.sbin/bgpd/session.c3
1 files changed, 2 insertions, 1 deletions
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 <henning@openbsd.org>
@@ -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]);