netdev
[Top] [All Lists]

Re: [PATCH] connect() return value.

To: glee@xxxxxxxxxxxxxxx (Geoffrey Lee)
Subject: Re: [PATCH] connect() return value.
From: kuznet@xxxxxxxxxxxxx
Date: Wed, 14 Aug 2002 08:16:44 +0400 (MSD)
Cc: netdev@xxxxxxxxxxx
In-reply-to: <20020814030242.GA30872@xxxxxxxxxxxxxxxx> from "Geoffrey Lee" at Aug 14, 2 01:02:42 pm
Sender: owner-netdev@xxxxxxxxxxx
Hello!

> to hear your reasons why a read or a write returning -ENOTCONN is a

Because any error but EAGAIN/EINTR is failure. As you convinced
yourself there is no good way to detect connection completion,
so in fact writing correct program is next to impossible.

Actually, never in my life I have seen a pattern of program
with waits for EISCONN after EINTR on connect() (but lots of them
fail when not seeing 0), so I have no idea why they work under these OSes.
Apparently, they fail randomly.

Alexey


<Prev in Thread] Current Thread [Next in Thread>