Programming and posix - February 2001

February 10, 2001
Solution Symposium
Page 34
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