Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ writev(2) — DG/UX 4.30

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

creat(2)

dup(2)

dup2(2)

fcntl(2)

ioctl(2)

lseek(2)

open(2)

pipe(2)

select(2)

socket(2)

socketpair(2)

ulimit(2)

write(2)



     writev(2)                  DG/UX 4.30                   writev(2)



     NAME
          writev - Write on a file.

     SYNOPSIS
          #include <sys/types.h>
          #include <sys/uio.h>

          int  writev  (fildes, iov, iovent)
             int             fildes;
             struct iovec    iov[];
             int             iovent;

     PARAMETERS
          fildes         An active, valid file descriptor.

          iov            An array of extents.

          iovent         The number of extents given.

     DESCRIPTION
          The writev system call transfers data from the iovlen
          buffers specified by members of the iov array:  iov[0],
          iov[1], ..., iov[iovlen-1] into the object associated with
          fildes.

          For writev, the iovec structure is defined as:

            struct iovec {
              caddr_t  iov_base;
              int      iov_len;
              };

          Each iov member specifies the base address and length of an
          area in memory where data is located.  The writev call uses
          an area completely before proceeding to the next.

          Iovent must be a positive number less than or equal to a
          system-imposed limit guaranteed to be at least MAXIOVCNT.
          The length of each extent (iov_len) in iov[] must be non-
          negative and the sum of these lengths must not overflow a
          `long'.

          Except for the disposition of the data, writev is equivalent
          to write.

     ACCESS CONTROL
          Fildes must be open for writing.

     RETURN VALUE
          0..nbyte       Completed successfully.  The number of bytes
                         actually written is returned.  Here, nbyte is
                         the sum of lengths of the iovent extents



     Licensed material--property of copyright holder(s)         Page 1





     writev(2)                  DG/UX 4.30                   writev(2)



                         given in iov[].

          -1             An error occurred.  Errno is set to indicate
                         the error.

     EXCEPTIONS
          Errno may be set to one of the following error codes:

          EBADF          Fildes is not a valid file descriptor open
                         for writing.

          EPIPE and SIGPIPE signal
                         An attempt is made to write to a pipe not
                         open for writing or a socket of type
                         SOCK_STREAM that is not connected to a peer
                         socket.

          EFBIG          An attempt was made to write a file that
                         exceeds the process's file size limit or the
                         maximum file size.

          EINTR          A signal was caught during the system call.

          EFAULT         Iov points outside the allocated address
                         space.

          EFAULT         One or more of the iov[] members point
                         outside the allocated address space.

          EINVAL         Iovent was invalid.

          EINVAL         One or more of the iov_len values in iov[]
                         was negative.

          EINVAL         The sum of the iov_len values in iov[]
                         overflowed a `long'.

     SEE ALSO
          creat(2), dup(2), dup2(2), fcntl(2), ioctl(2), lseek(2),
          open(2), pipe(2), select(2), socket(2), socketpair(2),
          ulimit(2), write(2).














     Licensed material--property of copyright holder(s)         Page 2



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026