diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-02-17 00:04:43 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-02-17 19:34:28 +0100 |
commit | 4096d12ee006ab5aab4f6c62f89011b5c240778e (patch) | |
tree | 0b632f1782602c16187e149676103a36830c9619 | |
parent | 5cd45e16ef243b8f22edf2ec4b6794a235817578 (diff) |
bsc: Print the talloc allocation report on SIGUSR1
-rw-r--r-- | src/bsc.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -26,6 +26,7 @@ #include <mtp_pcap.h> #include <osmocore/talloc.h> +#include <osmocom/vty/vty.h> #include <sys/types.h> #include <sys/stat.h> @@ -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); } + |