osmo_io: Use MSG_NOSIGNAL to avoid SIGPIPE on write

Change-Id: I85433124a8e80fc2aa19b551bdaf2655ef1eea2c
This commit is contained in:
Daniel Willmann 2023-08-01 09:55:13 +02:00
parent f083382b9c
commit 92efac26d7
1 changed files with 1 additions and 1 deletions

View File

@ -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];