diff options
author | Harald Welte <laforge@gnumonks.org> | 2009-11-30 19:37:18 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2009-12-01 17:58:26 +0530 |
commit | 3961fcc0313f1d87ab64806638e416f2603e7345 (patch) | |
tree | 8e19c889f458c8747e2c947c577c4b22490d3a21 | |
parent | b84ddfc22f60ed42c0c0ee5367c42a56157a7c75 (diff) |
Introduce new S_GLOBAL_SHUTDOWN signal
This is used to notify various parts of OpenBSC that we're shutting
down.
-rw-r--r-- | openbsc/include/openbsc/signal.h | 5 | ||||
-rw-r--r-- | openbsc/src/bsc_hack.c | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/signal.h b/openbsc/include/openbsc/signal.h index 5156fcb79..d59bb9726 100644 --- a/openbsc/include/openbsc/signal.h +++ b/openbsc/include/openbsc/signal.h @@ -40,6 +40,7 @@ enum signal_subsystems { SS_LCHAN, SS_SUBSCR, SS_SCALL, + SS_GLOBAL, }; /* SS_PAGING signals */ @@ -99,6 +100,10 @@ enum signal_scall { S_SCALL_DETACHED, }; +enum signal_global { + S_GLOBAL_SHUTDOWN, +}; + typedef int signal_cbfn(unsigned int subsys, unsigned int signal, void *handler_data, void *signal_data); diff --git a/openbsc/src/bsc_hack.c b/openbsc/src/bsc_hack.c index c256f864e..ee37a6115 100644 --- a/openbsc/src/bsc_hack.c +++ b/openbsc/src/bsc_hack.c @@ -35,6 +35,7 @@ #include <openbsc/debug.h> #include <openbsc/e1_input.h> #include <openbsc/talloc.h> +#include <openbsc/signal.h> /* MCC and MNC for the Location Area Identifier */ struct gsm_network *bsc_gsmnet = 0; @@ -143,6 +144,7 @@ static void signal_handler(int signal) switch (signal) { case SIGINT: bsc_shutdown_net(bsc_gsmnet); + dispatch_signal(SS_GLOBAL, S_GLOBAL_SHUTDOWN, NULL); sleep(3); exit(0); break; |