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
F102942045: D24530.diff
Tue, Nov 19, 1:02 AM
Unknown Object (File)
Fri, Nov 1, 1:49 PM
Unknown Object (File)
Oct 1 2024, 9:42 AM
Unknown Object (File)
Oct 1 2024, 9:32 AM
Unknown Object (File)
Oct 1 2024, 9:30 AM
Unknown Object (File)
Sep 24 2024, 4:08 AM
Unknown Object (File)
Sep 18 2024, 4:49 PM
Unknown Object (File)
Sep 2 2024, 3:19 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