<div class="gmail_quote">Since SIGPIPE is no longer touched by default when MSG_NOSIGNAL is<br>
available, it's extra-critical that all socket writes actually pass<br>
that flag.<br>
---<br>
dbus/dbus-sysdeps-unix.c | 12 ++++++++++--<br>
1 files changed, 10 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c<br>
index 97a6a4a..8688ca2 100644<br>
--- a/dbus/dbus-sysdeps-unix.c<br>
+++ b/dbus/dbus-sysdeps-unix.c<br>
@@ -1493,9 +1493,17 @@ write_credentials_byte (int server_fd,<br>
again:<br>
<br>
#if defined(HAVE_CMSGCRED)<br>
- bytes_written = sendmsg (server_fd, &msg, 0);<br>
+ bytes_written = sendmsg (server_fd, &msg, 0<br>
+#ifdef MSG_NOSIGNAL<br>
+ |MSG_NOSIGNAL<br>
+#endif<br>
+ );<br>
#else<br>
- bytes_written = write (server_fd, buf, 1);<br>
+ bytes_written = send (server_fd, buf, 1, 0<br>
+#ifdef MSG_NOSIGNAL<br>
+ |MSG_NOSIGNAL<br>
+#endif<br>
+ );<br>
#endif<br>
<br>
if (bytes_written < 0 && errno == EINTR)<br>
<font color="#888888">--<br>
1.7.1<br>
<br>
</font></div><br>