\fBvread(fildes, buffer, nbytes)\fR
A file descriptor is a word returned from a successful
contiguous bytes into which the input will be placed.
It is not guaranteed that all
In particular, if the returned value is 0, then end-of-file has been reached.
does not necessarily or immediately fetch the data requested from
but merely insures that the data will be fetched from the file descriptor
the first reference to the data, at the system's discretion.
allows the system, among other possibilities,
to choose to read data on demand,
with whatever granularity is allowed by the memory management hardware,
or to just read it in immediately as with
(2) call may be used with
to provide an efficient mechanism for updating large files.
if other processes are writing to
and the current offset in
(2)) must be aligned to a multiple of VALSIZ (defined in ``<valign.h>'').
(3) allocates properly aligned blocks from the free list.
Note for non-virtual systems: the
system call can be simulated (exactly, if less efficiently) by
is done is not capable of supporting efficient demand initialization
(e.g. a terminal or a pipe), then the system may choose to treat a call to
read(2), write(2), vwrite (2), valloc(3)
A 0 is returned at end-of-file. If the read was otherwise unsuccessful,
a -1 is returned. Physical I/O errors, non-aligned or bad buffer addresses,
file descriptor not that of an input file, and file offset not properly
aligned can all generate errors.
a file descriptor which you have
from while there are still pages in the file which haven't been fetched by the
system into your address space. In no case can a file descriptor which had
such pages at the point of a
The system refuses to truncate a file to which any process has a pending
There is no primitive inverting
sets up so that the file may be closed.
This can be only be done, clumsily, by reading another (plain) file onto the
buffer area, or pulling the break back with
to completely release the pages.