In article <[EMAIL PROTECTED]>,
Ronald F. Guilmette <[EMAIL PROTECTED]> 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                                               [EMAIL PROTECTED]
  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 [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to