From owner-freebsd-hackers Thu Nov 14 17:30:50 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id RAA00462 for hackers-outgoing; Thu, 14 Nov 1996 17:30:50 -0800 (PST) Received: from austin.polstra.com (austin.polstra.com [206.213.73.10]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id RAA00456 for ; Thu, 14 Nov 1996 17:30:39 -0800 (PST) Received: from austin.polstra.com (jdp@localhost) by austin.polstra.com (8.7.6/8.7.3) with ESMTP id RAA11283; Thu, 14 Nov 1996 17:27:44 -0800 (PST) Message-Id: <199611150127.RAA11283@austin.polstra.com> To: Terry Lambert cc: scrappy@ki.net, jgreco@brasil.moneng.mei.com, hackers@FreeBSD.ORG Subject: Re: Sockets question... In-reply-to: Your message of "Thu, 14 Nov 1996 18:12:13 MST." <199611150112.SAA25075@phaeton.artisoft.com> References: <199611150112.SAA25075@phaeton.artisoft.com> Date: Thu, 14 Nov 1996 17:27:43 -0800 From: John Polstra Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > If you don't use non-blocking I/O, the read will block until the > buffer is full. Use blocking I/O, and you won't have the problem > with the reader returning before it should (or shouldn't). This is most certainly not guaranteed by the documentation. From read(2): The system guarantees to read the number of bytes requested if the descriptor references a normal file that has that many bytes left before the end-of-file, but in no other case. John -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "Self-knowledge is always bad news." -- John Barth