diff options
Diffstat (limited to 'lib/libc/sys/read.2')
-rw-r--r-- | lib/libc/sys/read.2 | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/lib/libc/sys/read.2 b/lib/libc/sys/read.2 index 3f9c585531d..b898d00d345 100644 --- a/lib/libc/sys/read.2 +++ b/lib/libc/sys/read.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: read.2,v 1.31 2011/11/06 17:22:20 schwarze Exp $ +.\" $OpenBSD: read.2,v 1.32 2013/04/08 06:26:12 guenther Exp $ .\" $NetBSD: read.2,v 1.6 1995/02/27 12:35:47 cgd Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)read.2 8.4 (Berkeley) 2/26/94 .\" -.Dd $Mdocdate: November 6 2011 $ +.Dd $Mdocdate: April 8 2013 $ .Dt READ 2 .Os .Sh NAME @@ -40,18 +40,17 @@ .Nm preadv .Nd read input .Sh SYNOPSIS -.Fd #include <sys/types.h> .Fd #include <unistd.h> .Ft ssize_t .Fn read "int d" "void *buf" "size_t nbytes" .Ft ssize_t .Fn pread "int d" "void *buf" "size_t nbytes" "off_t offset" .Pp -.Fd #include <sys/types.h> .Fd #include <sys/uio.h> -.Fd #include <unistd.h> .Ft ssize_t .Fn readv "int d" "const struct iovec *iov" "int iovcnt" +.Fd #include <sys/types.h> +.Fd #include <sys/uio.h> .Ft ssize_t .Fn preadv "int d" "const struct iovec *iov" "int iovcnt" "off_t offset" .Sh DESCRIPTION @@ -154,10 +153,7 @@ Part of .Fa buf points outside the process's allocated address space. .It Bq Er EIO -An I/O error occurred while reading from the file system, -or the process is a member of a background process attempting to read -from its controlling terminal, the process is ignoring or blocking -the SIGTTIN signal or the process group is orphaned. +An I/O error occurred while reading from the file system. .It Bq Er EINTR A read from a slow device (i.e. one that might block for an arbitrary amount of time) @@ -169,11 +165,20 @@ In addition, .Fn read and .Fn readv -may return the following error: +may return the following errors: .Bl -tag -width Er .It Bq Er EAGAIN The file was marked for non-blocking I/O, and no data were ready to be read. +.It Bq Er ENOTCONN +The file is a socket associated with a connection-oriented protocol +and has not been connected. +.It Bq Er EIO +The process is a member of a background process attempting to read +from its controlling terminal, the process is ignoring or blocking +the +.Dv SIGTTIN +signal or the process group is orphaned. .El .Pp .Fn read @@ -232,15 +237,12 @@ points outside the process's allocated address space. .Xr socketpair 2 .Sh STANDARDS The -.Fn read -function conforms to -.St -p1003.1-90 . -The -.Fn readv +.Fn read , +.Fn readv , and .Fn pread functions conform to -.St -xpg4.2 . +.St -p1003.1-2008 . .Sh HISTORY A .Fn read |