summaryrefslogtreecommitdiffstats
path: root/zebra/main.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2018-07-26 02:27:40 +0200
committerQuentin Young <qlyoung@cumulusnetworks.com>2018-07-31 01:06:27 +0200
commitf3e33b690b01c37858c11856901fe9e6614dda6b (patch)
tree99186455fe23a5ea4a27ecc75654bdf8ad6bbe5d /zebra/main.c
parentlib: add cancel point to default pthread loop (diff)
downloadfrr-f3e33b690b01c37858c11856901fe9e6614dda6b.tar.xz
frr-f3e33b690b01c37858c11856901fe9e6614dda6b.zip
zebra: dont delete pthreads from under themselves
* Rename some things to be less confusing * Convert client close function to take a client struct rather than a task * Extern client close function and use it when handling SIGTERM Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'zebra/main.c')
-rw-r--r--zebra/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/zebra/main.c b/zebra/main.c
index 3e44a4170..8830a382f 100644
--- a/zebra/main.c
+++ b/zebra/main.c
@@ -134,11 +134,16 @@ static void sigint(void)
{
struct vrf *vrf;
struct zebra_vrf *zvrf;
+ struct listnode *ln, *nn;
+ struct zserv *client;
zlog_notice("Terminating on signal");
frr_early_fini();
+ for (ALL_LIST_ELEMENTS(zebrad.client_list, ln, nn, client))
+ zserv_close_client(client);
+
list_delete_all_node(zebrad.client_list);
zebra_ptm_finish();