using unix domain socket get ENOTCONN in both 6.2 and 7.0
Peter Jeremy
peterjeremy at optushome.com.au
Mon Sep 17 04:51:09 PDT 2007
On 2007-Sep-17 16:12:41 +0800, Deng XueFeng <dengxf at gmail.com> wrote:
>then I write a test program, and can reproduce in 6.2 and 7.0
Read() and write() do not preserve message boundaries so you cannot
guarantee to read 8193 bytes just because you wrote 8193 bytes.
>#./ud_test
>child recv len [4992] failed: Unknown error: 0
This is an error in your program: The read() succeeded and returned
4992 bytes. The child then exits
>main send len [-1] failed: Socket is not connected
Which leaves the socket unconnected so the parent (correctly) receives
an error.
--
Peter Jeremy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20070917/a4ba18be/attachment.pgp
More information about the freebsd-current
mailing list