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)
Wed, Dec 11, 6:17 PM
Unknown Object (File)
Wed, Dec 11, 5:28 PM
Unknown Object (File)
Mon, Dec 9, 5:33 AM
Unknown Object (File)
Sun, Dec 8, 12:20 AM
Unknown Object (File)
Nov 19 2024, 3:29 AM
Unknown Object (File)
Nov 19 2024, 1:02 AM
Unknown Object (File)
Nov 1 2024, 1:49 PM
Unknown Object (File)
Oct 1 2024, 9:42 AM

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