2 write - write to a file descriptor
5 ssize_t write(int fd, const void *buf, size_t count);
8 write writes up to count bytes to the file referenced by
9 the file descriptor fd from the buffer starting at buf.
12 On success, the number of bytes written are returned (zero
13 indicates nothing was written). On error, -1 is returned,
14 and errno is set appropriately.
17 EBADF fd is not a valid file descriptor or is not open
20 EINVAL fd is attached to an object which is unsuitable for
23 EPIPE fd is connected to a socket whose reading
26 EAGAIN Non-blocking I/O has been selected using O_NONBLOCK
27 and there was no room in the pipe or socket conĀ
28 nected to fd to write the data immediately.
30 EINTR The call was interrupted before any
33 ENOSPC The device containing the file referred to by fd
34 has no room for the data.
36 EIO A low-level I/O error occurred.