On Wed, Aug 14, 2002 at 09:25:39PM +0400, kuznet@xxxxxxxxxxxxx wrote:
> Hello!
>
> > So, in the near future, we can expect Linux to not return 0 for
> > non-blocking connects (i.e. the change you mentioned)?
>
> I wanted, but I changed my opinion about this. It is pretty strange to mimic
> behavior of solaris/tru64 and Co, which is really stinking.
>
It is true it is bad to go for a technically inferior solution that
EINTR must be handled by the userspace code.
> So, despite of our current behavior is not perfect and even not
> quite self-consistent, it is the best one. Well, and it does not
> contradict to sus/posix.
>
Agreed for both points, as far as I recall it is not standardized,
not even what "may" or "should" be done.
> So, connect() remains restartable, and it will return 0 on success
> instead of EISCONN crap.
Yep.
I research how sockets are done on various Unix as a hobby. So,
one of the motives of my original letter was that I wanted to know
whether there is any special reasons (well now I know after this
discussion) why Linux's connect is restartable.
I will make a special note of that in my notes.
Thanks for this fruitful discussion. :-)
-- G.
|