]> git.karo-electronics.de Git - karo-tx-redboot.git/blob - packages/net/tcpip/v2_0/doc/write.man
Initial revision
[karo-tx-redboot.git] / packages / net / tcpip / v2_0 / doc / write.man
1 NAME
2        write - write to a file descriptor
3
4 SYNOPSIS
5        ssize_t write(int fd, const void *buf, size_t count);
6
7 DESCRIPTION
8        write  writes  up to count bytes to the file referenced by
9        the file descriptor fd from the buffer  starting  at  buf.
10
11 RETURN VALUE
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.
15
16 ERRORS
17        EBADF  fd is not a valid file descriptor or  is  not  open
18               for writing.
19
20        EINVAL fd is attached to an object which is unsuitable for
21               writing.
22
23        EPIPE  fd is connected to a socket  whose  reading
24               end  is closed.
25
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.
29
30        EINTR  The call was interrupted before  any
31               data was written.
32
33        ENOSPC The  device  containing  the file referred to by fd
34               has no room for the data.
35
36        EIO    A low-level I/O error occurred.