int write(fildes, buf, nbyte);
write attempts to write nbyte bytes from the buffer pointed to by buf to the file associated with fildes.
On devices capable of seeking, the writing of data proceeds from the position in the file indicated by the file pointer. Upon returning from write, the file pointer is incremented by the number of bytes written.
On devices incapable of seeking, writing always takes place starting at the current position. The value of a file pointer associated with such a device is undefined.
write will fail and the file pointer will remain unchaged if one or more of the following are true:
If the file being written is a FIFO on the host, no partial writes will be permitted. Thus, the write will fail if a write of nbyte bytes would exceed a limit.