From 4096d12ee006ab5aab4f6c62f89011b5c240778e Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Thu, 17 Feb 2011 00:04:43 +0100 Subject: bsc: Print the talloc allocation report on SIGUSR1 --- src/bsc.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/bsc.c') diff --git a/src/bsc.c b/src/bsc.c index 50745b0..ce0b9c3 100644 --- a/src/bsc.c +++ b/src/bsc.c @@ -26,6 +26,7 @@ #include #include +#include #include #include @@ -109,6 +110,12 @@ out: pthread_mutex_unlock(&exit_mutex); } +static void sigusr1() +{ + talloc_report(tall_vty_ctx, stderr); + talloc_report_full(bsc, stderr); +} + static void sigusr2() { struct msc_connection *msc; @@ -181,5 +188,7 @@ void handle_options(int argc, char **argv) signal(SIGPIPE, SIG_IGN); signal(SIGINT, sigint); + signal(SIGUSR1, sigusr1); signal(SIGUSR2, sigusr2); } + -- cgit v1.2.3