This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
neels gerrit-no-reply at lists.osmocom.orgneels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/24675 ) Change subject: use osmo_select_shutdown to get rid of SIGTERM sleep ...................................................................... use osmo_select_shutdown to get rid of SIGTERM sleep Change-Id: I9a4a629805c49240b8be412e9def298cdf5bc996 --- M src/osmo-bsc/osmo_bsc_main.c 1 file changed, 5 insertions(+), 3 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve dexter: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index 14475ff..2a6c501 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -697,10 +697,12 @@ switch (signum) { case SIGINT: case SIGTERM: + /* If SIGTERM was already sent before, just terminate immediately. */ + if (osmo_select_shutdown_requested()) + exit(-1); bsc_shutdown_net(bsc_gsmnet); osmo_signal_dispatch(SS_L_GLOBAL, S_L_GLOBAL_SHUTDOWN, NULL); - sleep(3); - exit(0); + osmo_select_shutdown_request(); break; case SIGABRT: /* in case of abort, we want to obtain a talloc report and @@ -1033,7 +1035,7 @@ } } - while (1) { + while (!osmo_select_shutdown_done()) { osmo_select_main_ctx(0); } -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/24675 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I9a4a629805c49240b8be412e9def298cdf5bc996 Gerrit-Change-Number: 24675 Gerrit-PatchSet: 2 Gerrit-Owner: neels <nhofmeyr at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier at sysmocom.de> Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de> Gerrit-Reviewer: pespin <pespin at sysmocom.de> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210623/77e87c86/attachment.htm>