summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-06-12 16:51:37 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2018-06-12 16:54:10 +0200
commit5c576686e2c2d0063a5f6fe4016a8e91946fdf6b (patch)
tree8c0e11b9e0be941597364fb7a90045f0323cf065
parente9e757f8f3a1e449fb96e5f0eeb1f84d0c318902 (diff)
osmocon: Call osmo_init_ignore_signals at startup
It disables undesirable signals such as SIGPIPE, which exits the program if the client connected to osmocon closes the connection and osmocon writes to the connection fd. After SIGPIPE is disabled, write returns -EPIPE. This is required to keep osmocon running for BTS_Tests.ttcn TTCN3 tests. Change-Id: Id664ca0fadd3a8b3cf4b78bb868b3d78d2354544
-rw-r--r--src/host/osmocon/osmocon.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/host/osmocon/osmocon.c b/src/host/osmocon/osmocon.c
index 76f60374..be6e2440 100644
--- a/src/host/osmocon/osmocon.c
+++ b/src/host/osmocon/osmocon.c
@@ -44,6 +44,7 @@
#include <osmocom/core/serial.h>
#include <osmocom/core/talloc.h>
#include <osmocom/core/timer.h>
+#include <osmocom/core/application.h>
#include <arpa/inet.h>
@@ -1423,6 +1424,8 @@ int main(int argc, char **argv)
dnload.beacon_interval = DEFAULT_BEACON_INTERVAL;
dnload.do_chainload = 0;
+ osmo_init_ignore_signals();
+
while ((opt = getopt(argc, argv, "d:hl:p:m:cs:i:v")) != -1) {
switch (opt) {
case 'p':