From 92efac26d70f6623cb45386128b85e53863b2d6b Mon Sep 17 00:00:00 2001 From: Daniel Willmann Date: Tue, 1 Aug 2023 09:55:13 +0200 Subject: [PATCH] osmo_io: Use MSG_NOSIGNAL to avoid SIGPIPE on write Change-Id: I85433124a8e80fc2aa19b551bdaf2655ef1eea2c --- src/core/osmo_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/osmo_io.c b/src/core/osmo_io.c index f9d04fd67..db1b5adf5 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];