Writes a specified number of bytes from a buffer to a file.
#include <unistd.h>
ssize_t write (int file_desc, void *buffer,
size_t nbytes); (ISO POSIX-1)
int write (int file_desc, void *buffer,
int nbytes); (Compatability)
If the write is to a mailbox and the third argument, nbytes, specifies a length of 0, an end-of-file message is written to the mailbox. This occurs for mailboxes created by the application using SYS$CREMBX, but not for mailboxes created to implement POSIX pipes. For more information, see Chapter 5.
| x | The number of bytes written. |
| -1 | Indicates errors, including undefined file descriptors, illegal buffer addresses, and physical I/O errors. |