From 9240ef253f5adb849f2a0eb400bc80e57634bc07 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Mon, 29 Oct 2001 23:03:48 +0000 Subject: new function, ifdef'ed DEBUG_BACKENDS. (main): add SIGUSR2 handler for 2001-10-29 Chris Toshok * wombat.c (dump_backends): new function, ifdef'ed DEBUG_BACKENDS. (main): add SIGUSR2 handler for dump_backends, ifdef'ed DEBUG_BACKENDS. svn path=/trunk/; revision=14375 --- wombat/wombat.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'wombat/wombat.c') diff --git a/wombat/wombat.c b/wombat/wombat.c index f7fbc9227c..fba9b9e898 100644 --- a/wombat/wombat.c +++ b/wombat/wombat.c @@ -9,7 +9,14 @@ #include #endif +/* define this if you need/want to be able to send USR2 to wombat and + get a list of the active backends */ +/*#define DEBUG_BACKENDS*/ + #include +#ifdef DEBUG_BACKENDS +#include +#endif #include #include #include @@ -220,6 +227,15 @@ init_bonobo (int *argc, char **argv) } } +#ifdef DEBUG_BACKENDS +static void +dump_backends (int signal) +{ + pas_book_factory_dump_active_backends (pas_book_factory); + cal_factory_dump_active_backends (cal_factory); +} +#endif + int main (int argc, char **argv) { @@ -230,6 +246,10 @@ main (int argc, char **argv) g_message ("Starting wombat"); +#ifdef DEBUG_BACKENDS + signal (SIGUSR2, dump_backends); +#endif + init_bonobo (&argc, argv); setup_vfs (argc, argv); -- cgit