diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2013-09-03 16:40:13 +0400 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2013-09-03 16:41:22 +0400 |
commit | 7844d8e3d12e5e4c2ffbd1d1fb477970d2743696 (patch) | |
tree | 3f614425e7aa1ce5021baa0e62b5d8447241bbab | |
parent | 19e92f6c58d1e225404337448e72f7c9c7cf2a4d (diff) | |
download | accel-ppp-7844d8e3d12e5e4c2ffbd1d1fb477970d2743696.tar.gz accel-ppp-7844d8e3d12e5e4c2ffbd1d1fb477970d2743696.zip |
snmp: properly terminate snmp thread
-rw-r--r-- | accel-pppd/extra/net-snmp/agent.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/accel-pppd/extra/net-snmp/agent.c b/accel-pppd/extra/net-snmp/agent.c index 878cd9a7..7e06a79b 100644 --- a/accel-pppd/extra/net-snmp/agent.c +++ b/accel-pppd/extra/net-snmp/agent.c @@ -76,6 +76,7 @@ static void *snmp_thread(void *a) sigfillset(&set); sigdelset(&set, SIGKILL); sigdelset(&set, SIGSTOP); + sigdelset(&set, 32); pthread_sigmask(SIG_BLOCK, &set, NULL); snmp_register_callback(SNMP_CALLBACK_LIBRARY, SNMP_CALLBACK_LOGGING, agent_log, NULL); @@ -118,7 +119,8 @@ static void *snmp_thread(void *a) static void snmp_ctx_close(struct triton_context_t *ctx) { snmp_term = 1; - snmp_shutdown(conf_agent_name); + pthread_cancel(snmp_thr); + pthread_join(snmp_thr, NULL); triton_context_unregister(ctx); } |