From: Sebastian Harl Date: Tue, 22 Oct 2013 07:10:38 +0000 (+0200) Subject: daemon: Terminate backend thread after frontends have stopped. X-Git-Tag: sysdb-0.1.0~336^2~41 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=73fbdca45402b28401e9299dca2b6190c46c8f67;p=sysdb.git daemon: Terminate backend thread after frontends have stopped. --- diff --git a/src/daemon/sysdbd.c b/src/daemon/sysdbd.c index 072807d..e230922 100644 --- a/src/daemon/sysdbd.c +++ b/src/daemon/sysdbd.c @@ -77,7 +77,6 @@ static char *default_listen_addresses[] = { static void sigintterm_handler(int __attribute__((unused)) signo) { - plugin_main_loop.do_loop = 0; frontend_main_loop.do_loop = 0; } /* sigintterm_handler */ @@ -280,6 +279,7 @@ main(int argc, char **argv) if (i >= listen_addresses_num) sdb_fe_sock_listen_and_serve(sock, &frontend_main_loop); + sdb_log(SDB_LOG_INFO, "Waiting for backend thread to terminate"); plugin_main_loop.do_loop = 0; pthread_join(backend_thread, NULL); sdb_fe_sock_destroy(sock);