text: NAMEread, readv, pread, preadv — read input
  LIBRARYStandard C Library (libc, -lc)
  SYNOPSIS#include < sys/types.h>
  #include < unistd.h>
  ssize_t
  read( int fd, void *buf, size_t nbytes);
  ssize_t
  pread( int fd, void *buf, size_t nbytes, off_t offset);
  ssize_t
  readv( int fd, const struct iovec *iov, int iovcnt);
  ssize_t
  preadv( int fd, const struct iovec *iov, int iovcnt, off_t offset);
  DESCRIPTIONThe read() system call attempts to read nbytes of data from the object referenced by the descriptor fd-1]. The pread() and preadv() system calls perform the same functions, but read from the specified position in the file without modifying the file pointer..
  RETURN VALUESIf successful, the number of bytes actually read is returned. Upon reading end-of-file, zero is returned. Otherwise, a -1 is returned and the global variable errno is set to indicate the error.
  ERRORSThe read(), readv(), pread() and preadv() system calls will succeed unless:
  - [ EBADF]
  - The fd argument is not a valid file or socket descriptor open for reading.
  - [ ECONNRESET]
  - The fd argument refers to a socket, and the remote socket end is forcibly closed.
  - [ EFAULT]
  - The buf argument points outside the allocated address space.
  - [ EIO]
  - An I/O error occurred while reading from the file system.
  - [ pointer associated with fd array points outside the process's allocated address space.
  The pread() and preadv() system calls may also return the following errors:
  - [ EINVAL]
  - The offset value was negative.
  - [ ESPIPE]
  - The file descriptor is associated with a pipe, socket, or FIFO.