Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/12758 )

Change subject: Install signal handlers before processing config
......................................................................

Install signal handlers before processing config

It's easier to troubleshoot vty-related issues when we can send signals
to obtain talloc report.

Change-Id: I6dd1ad55a227db08595d844008be86f648fa92c1
---
M src/osysmon_main.c
1 file changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  osmith: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/src/osysmon_main.c b/src/osysmon_main.c
index eb4f50b..91d5039 100644
--- a/src/osysmon_main.c
+++ b/src/osysmon_main.c
@@ -210,6 +210,10 @@
        ping_init = osysmon_ping_init();
        osysmon_file_init();

+       signal(SIGUSR1, &signal_handler);
+       signal(SIGUSR2, &signal_handler);
+       osmo_init_ignore_signals();
+
        rc = vty_read_config_file(cmdline_opts.config_file, NULL);
        if (rc < 0) {
                fprintf(stderr, "Failed to parse the config file %s\n",
@@ -217,10 +221,6 @@
                exit(2);
        }

-       signal(SIGUSR1, &signal_handler);
-       signal(SIGUSR2, &signal_handler);
-       osmo_init_ignore_signals();
-
        if (cmdline_opts.daemonize) {
                rc = osmo_daemonize();
                if (rc < 0) {

-- 
To view, visit https://gerrit.osmocom.org/12758
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sysmon
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I6dd1ad55a227db08595d844008be86f648fa92c1
Gerrit-Change-Number: 12758
Gerrit-PatchSet: 2
Gerrit-Owner: Max <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Max <[email protected]>
Gerrit-Reviewer: daniel <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>

Reply via email to