Received: by oss.sgi.com id ; Mon, 26 Jun 2000 06:41:36 -0700 Received: from infoteka.nsk.ru ([212.20.32.40]:48652 "HELO infoteka.nsk.ru") by oss.sgi.com with SMTP id ; Mon, 26 Jun 2000 06:40:58 -0700 Received: (qmail 14882 invoked by uid 7770); 26 Jun 2000 13:40:11 -0000 Received: from ppp86.infoteka.nsk.ru (HELO dyp) (dyp@212.20.33.86) by infoteka.nsk.ru with SMTP; 26 Jun 2000 13:40:11 -0000 From: Denis Perchine To: David S. Miller , Andi Kleen , Alexey Kuznetsov , Networking Team Subject: Fwd: Problem with recv syscall on socket when other side closed connection Date: Mon, 26 Jun 2000 20:40:25 +0700 X-Mailer: KMail [version 1.0.29.1] Content-Type: text/plain MIME-Version: 1.0 Message-Id: <0006262043000Q.00485@dyp> Content-Transfer-Encoding: 8bit Sender: owner-netdev@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;netdev-outgoing Content-Length: 1318 Lines: 44 Hello all, I did not get any answer on this in linux-kernel. And I send it to maintainers now. The problem occurs in PostgreSQL 7.0.2. There's no such problem in FreeBSD & IRIX. They both gives you 0 after all received data is read. Any comments? ---------- Forwarded Message ---------- Subject: Problem with recv syscall on socket when other side closed connection Date: Sat, 24 Jun 2000 05:58:39 +0700 From: Denis Perchine Hello all, There's quite strange behavior of the linux kernel when other side closed connection and we try to read from socket. Firstly I get -1 and EPIPE in errno. Hmmm... I could not find anywhere in standards or manpages that recv can return EPIPE. OK... The if I try to continue read I will get the rest of the data which arrived between last read and connection close... Very strange logic... Any comments on this. -- Sincerely Yours, Denis Perchine ---------------------------------- E-Mail: dyp@perchine.com HomePage: http://www.perchine.com/dyp/ FidoNet: 2:5000/120.5 ---------------------------------- ------------------------------------------------------- -- Sincerely Yours, Denis Perchine ---------------------------------- E-Mail: dyp@perchine.com HomePage: http://www.perchine.com/dyp/ FidoNet: 2:5000/120.5 ----------------------------------