summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 49f6d1d)
raw | patch | inline | side by side (parent: 49f6d1d)
author | Sebastian Harl <sh@tokkee.org> | |
Tue, 10 Dec 2013 08:16:35 +0000 (09:16 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Tue, 10 Dec 2013 08:16:35 +0000 (09:16 +0100) |
This will interrupt the sleep call and make the thread shut down faster.
src/daemon/sysdbd.c | patch | blob | history |
diff --git a/src/daemon/sysdbd.c b/src/daemon/sysdbd.c
index 4fbf48f449b1eca24b4dc4bcdd7db346fe807da8..67d4515600f469f7806129822a128863a67948e7 100644 (file)
--- a/src/daemon/sysdbd.c
+++ b/src/daemon/sysdbd.c
backend_handler(void __attribute__((unused)) *data)
{
sdb_plugin_collector_loop(&plugin_main_loop);
+ sdb_log(SDB_LOG_INFO, "Shutting down backend thread");
return NULL;
} /* backend_handler */
sdb_log(SDB_LOG_INFO, "Waiting for backend thread to terminate");
plugin_main_loop.do_loop = 0;
+ pthread_kill(backend_thread, SIGINT);
pthread_join(backend_thread, NULL);
sdb_fe_sock_destroy(sock);
}