Hello!
> What are you intending to change? :-)
connect.
> > Could you repeat that test with read() after incomplete connect?
> > That your test was apparently invalid because of the same errno mistake,
> > so results may be different. Only, please, use read() with non-zero length.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> the read / write call. After that, we then we issue a 0 length
> read / write,
I asked you not to do this. This is pathological case, and return
value from this presents only academic interest.
> We find the errno after the first connect is indeed EINPROGRESS. A
> read with 0 length returns -1, with an errno of 134. That corresponds
> to ENOTCONN on Solaris.
F.e. if Solaris behaves in this way on normal not-nil read/write,
it is fatally buggy. I do not understand why it works after this,
just by plain luck.
read/write on not-yet-connected socket can only block (when blocking)
or return EAGAIN otherwise. Well, or complete sucessfully.
Alexey
|