aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Willmann <dwillmann@sysmocom.de>2023-08-01 09:55:13 +0200
committerDaniel Willmann <dwillmann@sysmocom.de>2023-08-08 10:02:33 +0200
commit92efac26d70f6623cb45386128b85e53863b2d6b (patch)
tree38734eeb8ce9e278260025bad415feb7096b82e0
parentf083382b9cbe454e3f316a65b70aedd0752cf8fa (diff)
osmo_io: Use MSG_NOSIGNAL to avoid SIGPIPE on write
-rw-r--r--src/core/osmo_io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/osmo_io.c b/src/core/osmo_io.c
index f9d04fd6..db1b5adf 100644
--- a/src/core/osmo_io.c
+++ b/src/core/osmo_io.c
@@ -321,7 +321,7 @@ int osmo_iofd_write_msgb(struct osmo_io_fd *iofd, struct msgb *msg)
if (!msghdr)
return -ENOMEM;
- msghdr->flags = 0;
+ msghdr->flags = MSG_NOSIGNAL;
msghdr->iov[0].iov_base = msgb_data(msghdr->msg);
msghdr->iov[0].iov_len = msgb_length(msghdr->msg);
msghdr->hdr.msg_iov = &msghdr->iov[0];