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/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged.
Change subject: virtphy: Add SIGINT+SIGTERM handlers
......................................................................
virtphy: Add SIGINT+SIGTERM handlers
Change-Id: I2fe65e0c1912c4d72c276a2db169f0bdbcbda2b8
---
M src/host/virt_phy/src/virtphy.c
1 file changed, 6 insertions(+), 0 deletions(-)
Approvals:
Harald Welte: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/host/virt_phy/src/virtphy.c b/src/host/virt_phy/src/virtphy.c
index 412b742..153f890 100644
--- a/src/host/virt_phy/src/virtphy.c
+++ b/src/host/virt_phy/src/virtphy.c
@@ -177,6 +177,10 @@
LOGP(DMAIN, LOGL_NOTICE, "Signal %d received\n", signum);
switch (signum) {
+ case SIGINT:
+ case SIGTERM:
+ exit(0);
+ break;
case SIGUSR1:
talloc_report_full(tall_vphy_ctx, stderr);
break;
@@ -190,6 +194,8 @@
tall_vphy_ctx = talloc_named_const(NULL, 1, "root");
msgb_talloc_ctx_init(tall_vphy_ctx, 0);
+ signal(SIGINT, &signal_handler);
+ signal(SIGTERM, &signal_handler);
signal(SIGUSR1, &signal_handler);
osmo_init_ignore_signals();
--
To view, visit https://gerrit.osmocom.org/3566
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I2fe65e0c1912c4d72c276a2db169f0bdbcbda2b8
Gerrit-PatchSet: 1
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder