Thread (1 message) 1 message, 1 author, 2016-07-22
DORMANTno replies

[PATCH] unix.7: Explain that MSG_NOSIGNAL is useless for recvmsg(2)

From: Laurent Georget <hidden>
Date: 2016-07-22 06:45:22
Subsystem: the rest · Maintainer: Linus Torvalds

Possibly related (same subject, not in this thread)

recvmsg(2) never causes a "Broken pipe" error but the unix(7) man page implies
that MSG_NOSIGNAL can be used in the flags of recvmsg(2) to avoid sending a
SIGPIPE. Fixes Bug 137351.

Signed-Off-By: Laurent Georget <redacted>

---
 man7/unix.7 | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Hi Michael,

I found the culprit line in unix(7). It can be misleading indeed because it
that it makes sense to use MSG_NOSIGNAL as a flag to recvmsg(2) to avoid a
SIGPIPE but recvmsg(2) actually never triggers such an error. I propose the
patch below to fix this.

Best regards,

Laurent Georget
diff --git a/man7/unix.7 b/man7/unix.7
index 82715f9..fce5eb2 100644
--- a/man7/unix.7
+++ b/man7/unix.7
@@ -515,12 +515,12 @@ Remote socket was closed on a stream socket.
 If enabled, a
 .B SIGPIPE
 is sent as well.
-This can be avoided by passing the
+Sending the signal can be avoided by passing the
 .B MSG_NOSIGNAL
 flag to
 .BR sendmsg (2)
-or
-.BR recvmsg (2).
+.RB ( recvmsg (2)
+never causes such an error).
 .TP
 .B EPROTONOSUPPORT
 Passed protocol is not
-- 
2.9.0

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help