From: Volker Lendecke Date: Mon, 29 May 2017 14:15:50 +0000 (+0200) Subject: lib: Remove use of MSG_NOSIGNAL X-Git-Tag: ldb-1.1.30~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ccd4f814882029eba6aac2ce379a82420dc5f79e;p=thirdparty%2Fsamba.git lib: Remove use of MSG_NOSIGNAL According to susv4 sendmsg, NOSIGAL is effective for stream-oriented sockets. Datagram sockets won't send SIGPIPE anyway. Looking at Linux kernel sources, this is only looked at in stream functions. I guess this is a left-over from my tmsgd attempts, which was based on stream sockets. messaging_dgm still only uses datagram sockets, so MSG_NOSIGNAL is not needed here. Bug: https://bugzilla.samba.org/show_bug.cgi?id=12502 Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme Autobuild-User(master): Ralph Böhme Autobuild-Date(master): Tue May 30 16:39:12 CEST 2017 on sn-devel-144 --- diff --git a/source3/lib/messages_dgm.c b/source3/lib/messages_dgm.c index dff8357f60d..095a319f94a 100644 --- a/source3/lib/messages_dgm.c +++ b/source3/lib/messages_dgm.c @@ -363,7 +363,7 @@ static ssize_t messaging_dgm_sendmsg(int sock, msghdr_prep_fds(&msg, buf, fdlen, fds, num_fds); do { - ret = sendmsg(sock, &msg, MSG_NOSIGNAL); + ret = sendmsg(sock, &msg, 0); } while ((ret == -1) && (errno == EINTR)); }