aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-litecell15
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-08-20 21:00:39 +0200
committerHarald Welte <laforge@gnumonks.org>2017-08-20 19:23:34 +0000
commit4d5df2ebd18efd1bdc8ea9d7e177c017c99e1981 (patch)
treea0fd75fb36226f9cf7c081053b185914e80d3884 /src/osmo-bts-litecell15
parented662e0799a4ee685082ac93cd6b93e82d62836b (diff)
Treat SIGTERM just like SIGINT in our programs
When somebody kills the process, it's best to handle the signal and to use the opportunity for some cleanup. We always did this in the BTS on SIGINT, but never on SIGTERM. Let's change it. Change-Id: I10009c08b7178988f646e2b6035197b9640ac9b5
Diffstat (limited to 'src/osmo-bts-litecell15')
-rw-r--r--src/osmo-bts-litecell15/misc/lc15bts_mgr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/osmo-bts-litecell15/misc/lc15bts_mgr.c b/src/osmo-bts-litecell15/misc/lc15bts_mgr.c
index cec9a82..7886a5e 100644
--- a/src/osmo-bts-litecell15/misc/lc15bts_mgr.c
+++ b/src/osmo-bts-litecell15/misc/lc15bts_mgr.c
@@ -226,6 +226,7 @@ static void signal_handler(int signal)
switch (signal) {
case SIGINT:
+ case SIGTERM:
lc15bts_check_temp(no_rom_write);
lc15bts_check_power(no_rom_write);
lc15bts_check_vswr(no_rom_write);
@@ -297,6 +298,7 @@ int main(int argc, char **argv)
osmo_init_ignore_signals();
signal(SIGINT, &signal_handler);
+ signal(SIGTERM, &signal_handler);
signal(SIGUSR1, &signal_handler);
signal(SIGUSR2, &signal_handler);