Page MenuHomeFreeBSD

send.2: document ENOTCONN for sendto w/SOCK_STREAM
ClosedPublic

Authored by knan-rfo_modirum.com on Apr 22 2020, 9:09 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, May 27, 12:40 AM
Unknown Object (File)
Mon, May 27, 12:40 AM
Unknown Object (File)
Wed, May 15, 12:02 PM
Unknown Object (File)
Tue, May 7, 1:49 PM
Unknown Object (File)
May 2 2024, 9:36 AM
Unknown Object (File)
Apr 30 2024, 4:44 PM
Unknown Object (File)
Apr 28 2024, 9:38 PM
Unknown Object (File)
Mar 29 2024, 12:48 PM

Details

Summary

sendto on an unconnected sock_stream unix socket can return ENOTCONN, which is not documented in the man page until now. Change that.

Diff Detail

Repository
rD FreeBSD doc repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

markj added inline comments.
lib/libc/sys/send.2
81

Sentences should start with a capital letter.

82

Should be .Er ENOTCONN

84

This sentence contradicts the previous one, which says that these functions can be used at any time.

212

Usually we'd use the text from POSIX, in this case "The socket is connection-mode but is not connected."

The text about implied open should be moved up to the paragraph that you're modifying above.

knan-rfo_modirum.com marked 4 inline comments as done.

Updated according to review comments. ENOTCONN description aligned with POSIX. Self-contradiction rewritten.

lib/libc/sys/send.2
73

Extra blank line.

86

We should further qualify that if the socket is connected, the destination address passed by sendto() and sendmsg() is ignored.

Let's just add .Xr connect 2 to the "SEE ALSO" section below, trying to avoid parentheticals.

knan-rfo_modirum.com marked 2 inline comments as done.

Clarified that destination address is ignored if socket is already connected, and clarified where the destination address is sent in the sendmsg call. Formatting.

Thanks, this looks ok to me.

This revision is now accepted and ready to land.Apr 27 2020, 2:34 PM