Date: Sun, 19 Dec 1999 19:25:02 -0800 (PST) From: John Polstra <jdp@polstra.com> To: rfg@monkeys.com Cc: hackers@freebsd.org Subject: Re: Practical limit for number of TCP connections? Message-ID: <199912200325.TAA30555@vashon.polstra.com> In-Reply-To: <48477.945643108@monkeys.com> References: <48477.945643108@monkeys.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In article <48477.945643108@monkeys.com>, Ronald F. Guilmette <rfg@monkeys.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199912200325.TAA30555>