summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhenning <henning@openbsd.org>2004-09-23 01:55:05 +0000
committerhenning <henning@openbsd.org>2004-09-23 01:55:05 +0000
commit032ced14f12763a04fcb1f6a1d170bbabcdd7760 (patch)
tree7f8257fc94bc2e93abea44786c341b1a830386bc
parentreset chld_pid to 0 when acting upon a SIGCHLD so we don't try to send it (diff)
downloadwireguard-openbsd-032ced14f12763a04fcb1f6a1d170bbabcdd7760.tar.xz
wireguard-openbsd-032ced14f12763a04fcb1f6a1d170bbabcdd7760.zip
after receival of a SIGCHLD reset io_pid or rde_pid, respectively, dependent
on which child went away.
-rw-r--r--usr.sbin/bgpd/bgpd.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.sbin/bgpd/bgpd.c b/usr.sbin/bgpd/bgpd.c
index 35882b6bd07..381ce2ed37e 100644
--- a/usr.sbin/bgpd/bgpd.c
+++ b/usr.sbin/bgpd/bgpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bgpd.c,v 1.108 2004/09/16 17:36:29 henning Exp $ */
+/* $OpenBSD: bgpd.c,v 1.109 2004/09/23 01:55:05 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -300,10 +300,14 @@ main(int argc, char *argv[])
if (sigchld) {
sigchld = 0;
- if (check_child(io_pid, "session engine"))
+ if (check_child(io_pid, "session engine")) {
quit = 1;
- if (check_child(rde_pid, "route decision engine"))
+ io_pid = 0;
+ }
+ if (check_child(rde_pid, "route decision engine")) {
quit = 1;
+ rde_pid = 0;
+ }
}
if (mrtdump == 1) {