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
This commit is contained in:
Pau Espin 2018-06-12 16:51:37 +02:00
parent e9e757f8f3
commit 5c576686e2
1 changed files with 3 additions and 0 deletions

View File

@ -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':