diff options
Diffstat (limited to 'usr/src/man/man2/read.2')
-rw-r--r-- | usr/src/man/man2/read.2 | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/usr/src/man/man2/read.2 b/usr/src/man/man2/read.2 index 71e0211dd2..53a8ccc482 100644 --- a/usr/src/man/man2/read.2 +++ b/usr/src/man/man2/read.2 @@ -9,7 +9,7 @@ .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH READ 2 "Sep 13, 2007" +.TH READ 2 "Dec 03, 2014" .SH NAME read, readv, pread \- read from file .SH SYNOPSIS @@ -33,7 +33,6 @@ read, readv, pread \- read from file .fi .SH DESCRIPTION -.sp .LP The \fBread()\fR function attempts to read \fInbyte\fR bytes from the file associated with the open file descriptor, \fIfildes\fR, into the buffer pointed @@ -245,7 +244,6 @@ reflects the prior error. If a hangup occurs on the stream being read, \fBread()\fR continues to operate normally until the stream head read queue is empty. Thereafter, it returns \fB0\fR. .SS "\fBreadv()\fR" -.sp .LP The \fBreadv()\fR function is equivalent to \fBread()\fR, but places the input data into the \fIiovcnt\fR buffers specified by the members of the \fIiov\fR @@ -273,7 +271,6 @@ area completely before proceeding to the next. Upon successful completion, \fBreadv()\fR marks for update the \fBst_atime\fR field of the file. .SS "\fBpread()\fR" -.sp .LP The \fBpread()\fR function performs the same action as \fBread()\fR, except that it reads from a given position in the file without changing the file @@ -284,13 +281,11 @@ offset value that can be represented in an \fBoff_t\fR for regular files. An attempt to perform a \fBpread()\fR on a file that is incapable of seeking results in an error. .SH RETURN VALUES -.sp .LP Upon successful completion, \fBread()\fR and \fBreadv()\fR return a non-negative integer indicating the number of bytes actually read. Otherwise, the functions return \fB\(mi1\fR and set \fBerrno\fR to indicate the error. .SH ERRORS -.sp .LP The \fBread()\fR, \fBreadv()\fR, and \fBpread()\fR functions will fail if: .sp @@ -328,6 +323,17 @@ Message waiting to be read on a stream is not a data message. .sp .ne 2 .na +\fB\fBECONNRESET\fR\fR +.ad +.RS 11n +The \fIfiledes\fR argument refers to a connection oriented socket and the +connection was forcibly closed by the peer and is no longer valid. I/O can no +longer be performed to \fIfiledes\fR. +.RE + +.sp +.ne 2 +.na \fB\fBEDEADLK\fR\fR .ad .RS 11n @@ -478,12 +484,10 @@ The \fIfildes\fR argument is associated with a pipe or FIFO. .RE .SH USAGE -.sp .LP The \fBpread()\fR function has a transitional interface for 64-bit file offsets. See \fBlf64\fR(5). .SH ATTRIBUTES -.sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -503,7 +507,6 @@ Standard See \fBstandards\fR(5). .TE .SH SEE ALSO -.sp .LP \fBIntro\fR(2), \fBchmod\fR(2), \fBcreat\fR(2), \fBdup\fR(2), \fBfcntl\fR(2), \fBgetmsg\fR(2), \fBioctl\fR(2), \fBlseek\fR(2), \fBopen\fR(2), \fBpipe\fR(2), |