diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-06-12 16:51:37 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-06-12 16:54:10 +0200 |
commit | 5c576686e2c2d0063a5f6fe4016a8e91946fdf6b (patch) | |
tree | 8c0e11b9e0be941597364fb7a90045f0323cf065 /src/host/osmocon | |
parent | e9e757f8f3a1e449fb96e5f0eeb1f84d0c318902 (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
Diffstat (limited to 'src/host/osmocon')
-rw-r--r-- | src/host/osmocon/osmocon.c | 3 |
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': |