write − write output
cc = write(d, buf, nbytes)
int cc, d;
char *buf;
int nbytes;
attempts to write
of data to the object referenced by the descriptor
from the buffer pointed to by
On objects capable of seeking, the write starts at a position
given by the pointer associated with
see
Upon return from
the pointer is incremented by the number of bytes actually written.
Objects that are not capable of seeking always write from the current
position. The value of the pointer associated with such an object
is undefined.
Upon successful completion the number of bytes actually written
is returned. Otherwise a −1 is returned and the global variable
is set to indicate the error.
lseek(3spp), open(3spp)