glibc is responsible for turning EPIPE into SIGPIPE, so do not pass it
to the translator which will either not know it (and return EINVAL), or
not know what to do about it.
---
sysdeps/mach/hurd/recv.c | 2 +-
sysdeps/mach/hurd/recvfrom.c | 2 +-
sysdeps/mach/hurd/recvmsg.c | 2 +-
sysdeps/mach/hurd/send.c | 2 +-
sysdeps/mach/hurd/sendmsg.c | 2 +-
sysdeps/mach/hurd/sendto.c | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/sysdeps/mach/hurd/recv.c b/sysdeps/mach/hurd/recv.c
index 7ff76c638f..acfdb5c534 100644
--- a/sysdeps/mach/hurd/recv.c
+++ b/sysdeps/mach/hurd/recv.c
@@ -41,7 +41,7 @@ __recv (int fd, void *buf, size_t n, int flags)
cancel_oldtype = LIBC_CANCEL_ASYNC();
err = HURD_DPORT_USE_CANCEL (fd, __socket_recv (port, &addrport,
- flags, &bufp, &nread,
+ flags & ~MSG_NOSIGNAL, &bufp,
&nread,
&ports, &nports,
&cdata, &clen,
&flags,
diff --git a/sysdeps/mach/hurd/recvfrom.c b/sysdeps/mach/hurd/recvfrom.c
index c9b39d76e4..4fd47028a2 100644
--- a/sysdeps/mach/hurd/recvfrom.c
+++ b/sysdeps/mach/hurd/recvfrom.c
@@ -44,7 +44,7 @@ __recvfrom (int fd, void *buf, size_t n, int flags,
__SOCKADDR_ARG addrarg,
cancel_oldtype = LIBC_CANCEL_ASYNC();
err = HURD_DPORT_USE_CANCEL (fd, __socket_recv (port, &addrport,
- flags, &bufp, &nread,
+ flags & ~MSG_NOSIGNAL, &bufp,
&nread,
&ports, &nports,
&cdata, &clen,
&flags,
diff --git a/sysdeps/mach/hurd/recvmsg.c b/sysdeps/mach/hurd/recvmsg.c
index e71961cbe7..1dc4120095 100644
--- a/sysdeps/mach/hurd/recvmsg.c
+++ b/sysdeps/mach/hurd/recvmsg.c
@@ -87,7 +87,7 @@ __libc_recvmsg (int fd, struct msghdr *message, int flags)
buf = data;
cancel_oldtype = LIBC_CANCEL_ASYNC();
err = HURD_DPORT_USE_CANCEL (fd, __socket_recv (port, &aport,
- flags, &data, &len,
+ flags & ~MSG_NOSIGNAL, &data,
&len,
&ports, &nports,
&cdata, &clen,
&message->msg_flags, amount));
diff --git a/sysdeps/mach/hurd/send.c b/sysdeps/mach/hurd/send.c
index 508e163d81..ca54f160d8 100644
--- a/sysdeps/mach/hurd/send.c
+++ b/sysdeps/mach/hurd/send.c
@@ -32,7 +32,7 @@ __send (int fd, const void *buf, size_t n, int flags)
cancel_oldtype = LIBC_CANCEL_ASYNC();
err = HURD_DPORT_USE_CANCEL (fd, __socket_send (port, MACH_PORT_NULL,
- flags, buf, n,
+ flags & ~MSG_NOSIGNAL, buf, n,
NULL,
MACH_MSG_TYPE_COPY_SEND, 0,
NULL, 0, &wrote));
LIBC_CANCEL_RESET (cancel_oldtype);
diff --git a/sysdeps/mach/hurd/sendmsg.c b/sysdeps/mach/hurd/sendmsg.c
index b0fc5e2371..1a4675a50f 100644
--- a/sysdeps/mach/hurd/sendmsg.c
+++ b/sysdeps/mach/hurd/sendmsg.c
@@ -184,7 +184,7 @@ __libc_sendmsg (int fd, const struct msghdr *message, int
flags)
/* Send the data. */
int cancel_oldtype = LIBC_CANCEL_ASYNC();
err = __socket_send (port, aport,
- flags, data.ptr, len,
+ flags & ~MSG_NOSIGNAL,
data.ptr, len,
ports,
MACH_MSG_TYPE_COPY_SEND,
nports,
diff --git a/sysdeps/mach/hurd/sendto.c b/sysdeps/mach/hurd/sendto.c
index 965111cdd2..b7cb62a60a 100644
--- a/sysdeps/mach/hurd/sendto.c
+++ b/sysdeps/mach/hurd/sendto.c
@@ -85,7 +85,7 @@ __sendto (int fd,
/* Send the data. */
int cancel_oldtype = LIBC_CANCEL_ASYNC();
err = __socket_send (port, aport,
- flags, buf, n,
+ flags & ~MSG_NOSIGNAL, buf,
n,
NULL,
MACH_MSG_TYPE_COPY_SEND, 0,
NULL, 0, &wrote);
--
2.53.0