443
edits
-
Changes
Created page with "<strong>READ</strong> ==SYNOPSIS== #include <unixio.h> int read(int fd, void * buf, size_t cnt) ==DESCRIPTION== <strong>Read</strong>() will read from the file associa..."
<strong>READ</strong>
==SYNOPSIS==
#include <unixio.h>
int read(int fd, void * buf, size_t cnt)
==DESCRIPTION==
<strong>Read</strong>() will read from the file associated with fd up to
cnt bytes into a buffer located at buf. It returns the
number of bytes actually read. A zero return indicates
end-of-file. A negative return indicates error. Fd
should have been obtained from a previous call to
<strong>open</strong>(). It is possible for <strong>read</strong>() to return less bytes
than requested, e.g. when reading from the console, in
which case <strong>read</strong>() will read one line of input.
==SEE ALSO==
open, close, write
==SYNOPSIS==
#include <unixio.h>
int read(int fd, void * buf, size_t cnt)
==DESCRIPTION==
<strong>Read</strong>() will read from the file associated with fd up to
cnt bytes into a buffer located at buf. It returns the
number of bytes actually read. A zero return indicates
end-of-file. A negative return indicates error. Fd
should have been obtained from a previous call to
<strong>open</strong>(). It is possible for <strong>read</strong>() to return less bytes
than requested, e.g. when reading from the console, in
which case <strong>read</strong>() will read one line of input.
==SEE ALSO==
open, close, write