Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ writev(2) — DG/UX 5.4.2A

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 5.4.2                       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;

   where:
       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 {
           caddrt  iovbase;
           int      iovlen;
           };

       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 (iovlen) 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 given in iov[].

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




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




writev(2)                        DG/UX 5.4.2                       writev(2)


DIAGNOSTICS
       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.

       EAGAIN    The O_NDELAY flag was set and there was not enough room in
                 the pipe.

       EDEADLK   Fildes refers to a file that has mandatory record locking
                 enabled and the read would produce a deadlock condition.

       ENOLCK    A lock required to complete the call cannot be allocated
                 from the system lock table.

       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 iovlen values in iov[] was negative.

       EINVAL    The sum of the iovlen 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)                         2


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