rfsimulator: ignore PIPE signal

When au UE disconnects, a write on the rf simulator socket may
generate a PIPE signal in the gnb and crash it.

Let's ignore this signal.
This commit is contained in:
Cedric Roux
2023-11-18 21:44:21 +01:00
parent 0accb601e4
commit 578cd23d59
+6
View File
@@ -1119,5 +1119,11 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
}
}
/* write on a socket fails if the other end is closed and we get SIGPIPE */
if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) {
perror("SIGPIPE");
exit(1);
}
return 0;
}