Change in osmo-pcu[master]: Don't register SIGHUP handler without actually handling SIGHUP

2018-05-15 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/9165 )

Change subject: Don't register SIGHUP handler without actually handling SIGHUP
..

Don't register SIGHUP handler without actually handling SIGHUP

In libosmocore, we normally register a SIGHUP handler for log file
rotation.

However, the osmo-pcu code so far installed its own signal handler,
which did exactly nothing in the SIGHUP case.

Let's fix this by removing SIGHUP handling here, letting libosmocore
take care about this.

Change-Id: Ifa20d79770bc4d88d40601b008a3a2a79d083c04
Closes: OS#3265
---
M src/pcu_main.cpp
1 file changed, 2 insertions(+), 3 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/pcu_main.cpp b/src/pcu_main.cpp
index 5b1b1be..7480842 100644
--- a/src/pcu_main.cpp
+++ b/src/pcu_main.cpp
@@ -143,7 +143,7 @@

 void sighandler(int sigset)
 {
-   if (sigset == SIGHUP || sigset == SIGPIPE)
+   if (sigset == SIGPIPE)
return;

fprintf(stderr, "Signal %d received.\n", sigset);
@@ -155,7 +155,6 @@
 * is terminated without finishing shutdown process.
 */
signal(SIGINT, SIG_DFL);
-   signal(SIGHUP, SIG_DFL);
signal(SIGTERM, SIG_DFL);
signal(SIGPIPE, SIG_DFL);
signal(SIGABRT, SIG_DFL);
@@ -311,12 +310,12 @@
return rc;

signal(SIGINT, sighandler);
-   signal(SIGHUP, sighandler);
signal(SIGTERM, sighandler);
signal(SIGPIPE, sighandler);
signal(SIGABRT, sighandler);
signal(SIGUSR1, sighandler);
signal(SIGUSR2, sighandler);
+   osmo_init_ignore_signals();

/* enable realtime priority for us */
if (rt_prio != -1) {

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ifa20d79770bc4d88d40601b008a3a2a79d083c04
Gerrit-Change-Number: 9165
Gerrit-PatchSet: 5
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: Neels Hofmeyr 


Change in osmo-pcu[master]: Don't register SIGHUP handler without actually handling SIGHUP

2018-05-15 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/9165 )

Change subject: Don't register SIGHUP handler without actually handling SIGHUP
..


Patch Set 5: Code-Review+2


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifa20d79770bc4d88d40601b008a3a2a79d083c04
Gerrit-Change-Number: 9165
Gerrit-PatchSet: 5
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: Neels Hofmeyr 
Gerrit-Comment-Date: Tue, 15 May 2018 14:24:21 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-pcu[master]: Don't register SIGHUP handler without actually handling SIGHUP

2018-05-15 Thread Harald Welte
Hello Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/9165

to look at the new patch set (#3).

Change subject: Don't register SIGHUP handler without actually handling SIGHUP
..

Don't register SIGHUP handler without actually handling SIGHUP

In libosmocore, we normally register a SIGHUP handler for log file
rotation.

However, the osmo-pcu code so far installed its own signal handler,
which did exactly nothing in the SIGHUP case.

Let's fix this by removing SIGHUP handling here, letting libosmocore
take care about this.

Change-Id: Ifa20d79770bc4d88d40601b008a3a2a79d083c04
Closes: OS#3265
---
M src/pcu_main.cpp
1 file changed, 2 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/65/9165/3
--
To view, visit https://gerrit.osmocom.org/9165
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ifa20d79770bc4d88d40601b008a3a2a79d083c04
Gerrit-Change-Number: 9165
Gerrit-PatchSet: 3
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: Neels Hofmeyr 


Change in osmo-pcu[master]: Don't register SIGHUP handler without actually handling SIGHUP

2018-05-15 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/9165 )

Change subject: Don't register SIGHUP handler without actually handling SIGHUP
..


Patch Set 2:

(1 comment)

https://gerrit.osmocom.org/#/c/9165/2/src/pcu_main.cpp
File src/pcu_main.cpp:

https://gerrit.osmocom.org/#/c/9165/2/src/pcu_main.cpp@146
PS2, Line 146:  if (sigset == SIGHUP || sigset == SIGPIPE)
remove SIGHUP here as well?



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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifa20d79770bc4d88d40601b008a3a2a79d083c04
Gerrit-Change-Number: 9165
Gerrit-PatchSet: 2
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-CC: Jenkins Builder
Gerrit-CC: Neels Hofmeyr 
Gerrit-Comment-Date: Tue, 15 May 2018 13:52:44 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-pcu[master]: Don't register SIGHUP handler without actually handling SIGHUP

2018-05-15 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/9165 )

Change subject: Don't register SIGHUP handler without actually handling SIGHUP
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifa20d79770bc4d88d40601b008a3a2a79d083c04
Gerrit-Change-Number: 9165
Gerrit-PatchSet: 2
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Comment-Date: Tue, 15 May 2018 13:45:49 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-pcu[master]: Don't register SIGHUP handler without actually handling SIGHUP

2018-05-15 Thread Harald Welte
Harald Welte has uploaded this change for review. ( 
https://gerrit.osmocom.org/9165


Change subject: Don't register SIGHUP handler without actually handling SIGHUP
..

Don't register SIGHUP handler without actually handling SIGHUP

In libosmocore, we normally register a SIGHUP handler for log file
rotation.

However, the osmo-pcu code so far installed its own signal handler,
which did exactly nothing in the SIGHUP case.

Let's fix this by removing SIGHUP handling here, letting libosmocore
take care about this.

Change-Id: Ifa20d79770bc4d88d40601b008a3a2a79d083c04
Closes: OS#3265
---
M src/pcu_main.cpp
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/65/9165/1

diff --git a/src/pcu_main.cpp b/src/pcu_main.cpp
index 84ade6f..611b2d0 100644
--- a/src/pcu_main.cpp
+++ b/src/pcu_main.cpp
@@ -308,12 +308,12 @@
return rc;

signal(SIGINT, sighandler);
-   signal(SIGHUP, sighandler);
signal(SIGTERM, sighandler);
signal(SIGPIPE, sighandler);
signal(SIGABRT, sighandler);
signal(SIGUSR1, sighandler);
signal(SIGUSR2, sighandler);
+   osmo_init_ignore_signals();

/* enable realtime priority for us */
if (rt_prio != -1) {

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifa20d79770bc4d88d40601b008a3a2a79d083c04
Gerrit-Change-Number: 9165
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte