Programming and posix - April 2002

April 3, 2002
Solution Symposium
Page 35
hp e3000
programming
and posix
file management - read()/write()
ssize_t read (int fildes, void *buffer, size_t
nbyte);
returns number of bytes actually read or -1 if error
can also be used on socket descriptors
ssize_t write (int fildes, const void *buffer,
size_t nbyte);
returns number of bytes actually written or -1 if error
can also be used on socket descriptors