From 4c7d3b167f3e7e480823288ad2c521077df5c67b Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Tue, 28 Apr 2009 15:52:55 +0300 Subject: [PATCH] obexd: Use SIGUSR2 for toggling debug messages --- obexd/src/main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/obexd/src/main.c b/obexd/src/main.c index ca6aa59c6..f6fac74cc 100644 --- a/obexd/src/main.c +++ b/obexd/src/main.c @@ -141,6 +141,11 @@ static void sig_term(int sig) g_main_loop_quit(main_loop); } +static void sig_debug(int sig) +{ + toggle_debug(); +} + static gboolean option_detach = TRUE; static gboolean option_debug = FALSE; @@ -349,6 +354,9 @@ int main(int argc, char *argv[]) sigaction(SIGINT, &sa, NULL); sigaction(SIGTERM, &sa, NULL); + sa.sa_handler = sig_debug; + sigaction(SIGUSR2, &sa, NULL); + g_main_loop_run(main_loop); bluetooth_exit(); -- 2.47.3