[Bug 245817] sendto() can return ENOTCONN on SOCK_STREAM unix socket, which is not documented

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Apr 22 10:01:26 UTC 2020


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=245817

            Bug ID: 245817
           Summary: sendto() can return ENOTCONN on SOCK_STREAM unix
                    socket, which is not documented
           Product: Documentation
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Manual Pages
          Assignee: bugs at FreeBSD.org
          Reporter: knan-bfo at modirum.com
                CC: doc at FreeBSD.org
 Attachment #213673 text/plain
         mime type:

Created attachment 213673
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=213673&action=edit
Minimal test program

send(2) manpage currently states "The send() function may be used only when the
 socket is in a connected state, while sendto(), sendmsg() and sendmmsg() may
be used at any time."

This seems inaccurate. Doing a sendto() on an unconnected SOCK_STREAM unix
socket results in an ENOTCONN error. ENOTCONN is not a documented possible
error from sendto.

Small c testcase showing the behaviour attached.

Suggested manpage patch submitted:
https://reviews.freebsd.org/D24530

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the freebsd-doc mailing list