Re[2]: Fwd: Re: Fwd: Problem with recv syscall on socket when other side closed connection

From: Denis Perchine <dyp(at)perchine(dot)com>
To: kuznet(at)ms2(dot)inr(dot)ac(dot)ru
Cc: tgl(at)sss(dot)pgh(dot)pa(dot)us ((Tom Lane)), alan(at)lxorguk(dot)ukuu(dot)org(dot)uk, pgsql-hackers(at)postgresql(dot)org, <davem(at)redhat(dot)com>
Subject: Re[2]: Fwd: Re: Fwd: Problem with recv syscall on socket when other side closed connection
Date: 2000-07-05 17:34:18
Message-ID: 3314645575.20000705213418@perchine.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello kuznet,

Wednesday, July 05, 2000, 7:06:06 PM, you wrote:

kmiar> Hello!

>> As I recall, the original complaint was precisely that Linux discards
>> the server->client data instead of allowing the client to read it. This
>> was on a single machine, so there's no issue of whether it got lost in
>> the network.

kmiar> I am sorry. I have already said: it is not truth.

kmiar> Original reporter (Denis) blamed particularly on the fact,
kmiar> that Linux allows to read all queued data until EOF.
kmiar> Try yourself, if you do not believe.

kmiar> Unfortunately, I deleted that his mail, but you can find it
kmiar> in mail archives I think, it was to netdev or to linux-kernel.

I blamed that: Linux gives you EPIPE when you call recv before all
data available is retrieved. If you will try to read AFTER error you
will get all data. Problem is that it makes handling very complicated.
In the case of EPIPE you should try to read again. The problem is that
you should always try only once.

--
Best regards,
Denis mailto:dyp(at)perchine(dot)com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-07-05 17:39:06 Re: Removing src/backend from include path might break on HPUX
Previous Message Jan Wieck 2000-07-05 17:22:45 Re: [HACKERS] Re: Revised Copyright: is this morepalatable?