From owner-freebsd-hackers Sun Dec 19 19:25:13 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from wall.polstra.com (rtrwan160.accessone.com [206.213.115.74]) by hub.freebsd.org (Postfix) with ESMTP id 9155315242 for ; Sun, 19 Dec 1999 19:25:07 -0800 (PST) (envelope-from jdp@polstra.com) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.9.3/8.9.3) with ESMTP id TAA03976; Sun, 19 Dec 1999 19:25:05 -0800 (PST) (envelope-from jdp@polstra.com) From: John Polstra Received: (from jdp@localhost) by vashon.polstra.com (8.9.3/8.9.1) id TAA30555; Sun, 19 Dec 1999 19:25:02 -0800 (PST) (envelope-from jdp@polstra.com) Date: Sun, 19 Dec 1999 19:25:02 -0800 (PST) Message-Id: <199912200325.TAA30555@vashon.polstra.com> To: rfg@monkeys.com Subject: Re: Practical limit for number of TCP connections? In-Reply-To: <48477.945643108@monkeys.com> References: <48477.945643108@monkeys.com> Organization: Polstra & Co., Seattle, WA Cc: hackers@freebsd.org Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In article <48477.945643108@monkeys.com>, Ronald F. Guilmette wrote: > > Is there code somewhere, perhaps within the libc implementation of read(2) > that looks to see what kind of device I am reading from, and then does two > different things if the read is for a disk file versus a read for a terminal? No. It's simply that the read() and write() system calls are willing to return EAGAIN or only do a portion of the requested I/O for pipes and sockets and terminals, but they are not willing to do that for disk I/O. There is a long-standing distinction in Unix between "slow" I/O devices and "fast" ones. Disks are "fast" ones, and the process always blocks until the full I/O has completed. This is not some kind of brokenness particular to FreeBSD; it's the way Unix has always behaved. John -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "No matter how cynical I get, I just can't keep up." -- Nora Ephron To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message