Instead, filter it in libc for old networking implementations, as
those do not support sending SIGPIPE to user processes anyway. This
change allows newer socket drivers to implement the flag as per the
specification.
Change-Id: I423bdf28ca60f024a344d0a73e2eab38f1b269da
return -1;
}
+ /* For old socket driver implementations, this flag is the default. */
+ flags &= ~MSG_NOSIGNAL;
+
r= ioctl(sock, NWIOGUDSSOTYPE, &uds_sotype);
if (r != -1 || errno != ENOTTY) {
if (r == -1) {
if (r != -1 || (errno != ENOTSOCK && errno != ENOSYS))
return r;
+ /* For old socket driver implementations, this flag is the default. */
+ flags &= ~MSG_NOSIGNAL;
+
r= ioctl(sock, NWIOGTCPOPT, &tcpopt);
if (r != -1 || errno != ENOTTY)
{
#define MSG_DONTWAIT 0x0080 /* this message should be nonblocking */
#define MSG_BCAST 0x0100 /* this message was rcvd using link-level brdcst */
#define MSG_MCAST 0x0200 /* this message was rcvd using link-level mcast */
-#if !defined(__minix)
#define MSG_NOSIGNAL 0x0400 /* do not generate SIGPIPE on EOF */
-#endif /* !defined(__minix) */
#if defined(_NETBSD_SOURCE)
#define MSG_CMSG_CLOEXEC 0x0800 /* close on exec receiving fd */
#define MSG_NBIO 0x1000 /* use non-blocking I/O */