Skip to contentSkip to conversation

New: MSG_NOSIGNAL not documented

Bug 137351 In review bugzilla-daemon-590EEB7GvNiWaY/[email protected] 3 participants 7 messages Jul 21, 2016 – Jul 24, 2016 2 messages not in the archive Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

https://bugzilla.kernel.org/show_bug.cgi?id=137351

Bug ID: 137351
Summary: MSG_NOSIGNAL not documented
Product: Documentation
Version: unspecified
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: man-pages
Assignee: documentation_man-pages-ztI5WcYan/[email protected]
Reporter: [email protected]
Regression: No

MSG_NOSIGNAL is not documented in man 2 recv.

Signature · 6 lines
You are receiving this mail because:
You are watching the assignee of the bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw

[Bug 137351] MSG_NOSIGNAL not documented in man 2 recv, OR misprint in man recvmsg in the line "This can be avoided by passing the MSG_NOSIGNAL flag to sendmsg(2) or recvmsg(2)."

In reply to a message not in the archive

https://bugzilla.kernel.org/show_bug.cgi?id=137351

Ivan Kharpalev <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

            Summary|MSG_NOSIGNAL not documented |MSG_NOSIGNAL not documented
                   |                            |in man 2 recv, OR misprint
                   |                            |in man recvmsg in the line
                   |                            |"This can be avoided by
                   |                            |passing the MSG_NOSIGNAL
                   |                            |flag to sendmsg(2) or
                   |                            |recvmsg(2)."
Signature · 6 lines
You are receiving this mail because:
You are watching the assignee of the bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#3 lore raw

[Bug 137351] MSG_NOSIGNAL not documented in man 2 recv, OR misprint in man recvmsg in the line "This can be avoided by passing the MSG_NOSIGNAL flag to sendmsg(2) or recvmsg(2)."

In reply to a message not in the archive

https://bugzilla.kernel.org/show_bug.cgi?id=137351

Michael Kerrisk <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #1 from Michael Kerrisk <[email protected]> --- But, as far as I know, it does nothing for recv(2). If you believe otherwise, please add some supporting info.

Signature · 6 lines
You are receiving this mail because:
You are watching the assignee of the bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#4 lore raw

PATCH 1/1 unix.7: Explain that MSG_NOSIGNAL is useless for recvmsg(2)

In reply to a message not in the archive

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.

---
 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

man7/unix.7 +3 -3
index 82715f9..fce5eb2 100644
@@ -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
Signature · 6 lines
2.9.0

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#7 lore raw

[Bug 137351] MSG_NOSIGNAL not documented in man 2 recv, OR misprint in man recvmsg in the line "This can be avoided by passing the MSG_NOSIGNAL flag to sendmsg(2) or recvmsg(2)."

In reply to a message not in the archive

https://bugzilla.kernel.org/show_bug.cgi?id=137351

--- Comment #2 from Michael Kerrisk <[email protected]> --- I see that you changed the title of the bug. This is far too cryptic as a way of reporting a bug. I can't find the text you refer to. Please note in a comment exactly the text and exactly the page you are referring to, and also check that the bug is present in the latest man page.

Signature · 6 lines
You are receiving this mail because:
You are watching the assignee of the bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#6 lore raw

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

In reply to a message not in the archive

Hello Laurent,

Quoted 10 lines · Laurent Georget

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.

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

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.

Thanks for delving into this and finding the page that had the problem reported in https://bugzilla.kernel.org/show_bug.cgi?id=137351

I applied a slightly somewhat different patch. See below.

Quoted 11 lines

Best regards,

Laurent Georget

man7/unix.7 +0 -0
index 82715f9..fce5eb2 100644
@@ -515,12 +515,12 @@ Remote socket was closed on a stream socket.
 If enabled, a
 .B SIGPIPE

man7/unix.7 Remote socket was closed on a stream socket. · line 523

Quoted 10 lines
man7/unix.7 +3 -3
 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).

I think the parenthetical comment isn't needed. The previous page text was obviously wrong, but we don't need to mention recvmsg() in the fix.

man7/unix.7 Remote socket was closed on a stream socket. · line 526

Quoted 3 lines
man7/unix.7 +0 -0
 .TP
 .B EPROTONOSUPPORT
 Passed protocol is not

I applied this patch:

[[

man7/unix.7 +2 -2
index e111734..0d44dd6 100644
@@ -518,9 +518,9 @@ is sent as well.
 This can be avoided by passing the
 .B MSG_NOSIGNAL
 flag to
-.BR sendmsg (2)
+.BR send (2)
 or
-.BR recvmsg (2).
+.BR sendmsg (2).
 .TP
 .B EPROTONOSUPPORT
 Passed protocol is not

]]

Cheers,

Michael

Signature · 7 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#8 lore raw

[Bug 137351] MSG_NOSIGNAL not documented in man 2 recv, OR misprint in man recvmsg in the line "This can be avoided by passing the MSG_NOSIGNAL flag to sendmsg(2) or recvmsg(2)."

In reply to a message not in the archive

https://bugzilla.kernel.org/show_bug.cgi?id=137351

Michael Kerrisk <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|---                         |CODE_FIX

--- Comment #3 from Michael Kerrisk <[email protected]> --- Applied the patch below. Closing this bug...

man7/unix.7 +2 -2
index e111734..0d44dd6 100644
@@ -518,9 +518,9 @@ is sent as well.
 This can be avoided by passing the
 .B MSG_NOSIGNAL
 flag to
-.BR sendmsg (2)
+.BR send (2)
 or
-.BR recvmsg (2).
+.BR sendmsg (2).
 .TP
 .B EPROTONOSUPPORT
 Passed protocol is not
Signature · 6 lines
You are receiving this mail because:
You are watching the assignee of the bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html