summaryrefslogtreecommitdiff
path: root/bgpd/bgp_main.c
diff options
context:
space:
mode:
authorLou Berger <lberger@labn.net>2018-05-10 08:47:11 -0400
committerLou Berger <lberger@labn.net>2018-05-10 08:47:11 -0400
commit97b4a0ec78f70a5f100e41a7222e121f4797a8fb (patch)
tree997cad24a7d615bc5743a046d2259d7e951943fe /bgpd/bgp_main.c
parent1c96f2fb9631415ec44046c915520f489a93ebc4 (diff)
bgpd: block io thread reads once shutdown has started
Signed-off-by: Lou Berger <lberger@labn.net>
Diffstat (limited to 'bgpd/bgp_main.c')
-rw-r--r--bgpd/bgp_main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bgpd/bgp_main.c b/bgpd/bgp_main.c
index 5158717b5d..004bdd90a2 100644
--- a/bgpd/bgp_main.c
+++ b/bgpd/bgp_main.c
@@ -143,6 +143,8 @@ void sighup(void)
__attribute__((__noreturn__)) void sigint(void)
{
zlog_notice("Terminating on signal");
+ assert(bm->terminating == false);
+ bm->terminating = true; /* global flag that shutting down */
if (!retain_mode)
bgp_terminate();