summaryrefslogtreecommitdiff
path: root/usr/src/man/man2/write.2
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/man/man2/write.2')
-rw-r--r--usr/src/man/man2/write.263
1 files changed, 9 insertions, 54 deletions
diff --git a/usr/src/man/man2/write.2 b/usr/src/man/man2/write.2
index f3a84a7dc7..78309c766a 100644
--- a/usr/src/man/man2/write.2
+++ b/usr/src/man/man2/write.2
@@ -2,14 +2,14 @@
.\" Copyright (c) 2087, Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright 1989 AT&T
.\" Portions Copyright (c) 1992, X/Open Company Limited. All Rights Reserved.
-.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
.\" http://www.opengroup.org/bookstore/.
.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
.\" This notice shall appear on any product containing this material.
.\" 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 write 2 "29 Jan 2008" "SunOS 5.11" "System Calls"
+.TH WRITE 2 "Jan 29, 2008"
.SH NAME
write, pwrite, writev \- write on a file
.SH SYNOPSIS
@@ -317,12 +317,10 @@ unchanged, and \fBerrno\fR is set to indicate an error.
The \fBwrite()\fR, \fBpwrite()\fR, and \fBwritev()\fR functions will fail if:
.sp
.ne 2
-.mk
.na
\fB\fBEAGAIN\fR\fR
.ad
.RS 11n
-.rt
Mandatory file/record locking is set, \fBO_NDELAY\fR or \fBO_NONBLOCK\fR is
set, and there is a blocking record lock; an attempt is made to write to a
stream that can not accept data with the \fBO_NDELAY\fR or \fBO_NONBLOCK\fR
@@ -332,58 +330,48 @@ requested and less than \fInbytes\fR of free space is available.
.sp
.ne 2
-.mk
.na
\fB\fBEBADF\fR\fR
.ad
.RS 11n
-.rt
The \fIfildes\fR argument is not a valid file descriptor open for writing.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEDEADLK\fR\fR
.ad
.RS 11n
-.rt
The write was going to go to sleep and cause a deadlock situation to occur.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEDQUOT\fR\fR
.ad
.RS 11n
-.rt
The user's quota of disk blocks on the file system containing the file has been
exhausted.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEFBIG\fR\fR
.ad
.RS 11n
-.rt
An attempt is made to write a file that exceeds the process's file size limit
or the maximum file size (see \fBgetrlimit\fR(2) and \fBulimit\fR(2)).
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEFBIG\fR\fR
.ad
.RS 11n
-.rt
The file is a regular file, \fInbyte\fR is greater than 0, and the starting
position is greater than or equal to the offset maximum established in the file
description associated with \fIfildes\fR.
@@ -391,23 +379,19 @@ description associated with \fIfildes\fR.
.sp
.ne 2
-.mk
.na
\fB\fBEINTR\fR\fR
.ad
.RS 11n
-.rt
A signal was caught during the write operation and no data was transferred.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEIO\fR\fR
.ad
.RS 11n
-.rt
The process is in the background and is attempting to write to its controlling
terminal whose \fBTOSTOP\fR flag is set, or the process is neither ignoring
nor blocking \fBSIGTTOU\fR signals and the process group of the process is
@@ -416,12 +400,10 @@ orphaned.
.sp
.ne 2
-.mk
.na
\fB\fBENOLCK\fR\fR
.ad
.RS 11n
-.rt
Enforced record locking was enabled and \fB{LOCK_MAX}\fR regions are already
locked in the system, or the system record lock table was full and the write
could not go to sleep until the blocking record lock was removed.
@@ -429,58 +411,48 @@ could not go to sleep until the blocking record lock was removed.
.sp
.ne 2
-.mk
.na
\fB\fBENOLINK\fR\fR
.ad
.RS 11n
-.rt
The \fIfildes\fR argument is on a remote machine and the link to that machine
is no longer active.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBENOSPC\fR\fR
.ad
.RS 11n
-.rt
During a write to an ordinary file, there is no free space left on the device.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBENOSR\fR\fR
.ad
.RS 11n
-.rt
An attempt is made to write to a streams with insufficient streams memory
resources available in the system.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBENXIO\fR\fR
.ad
.RS 11n
-.rt
A hangup occurred on the stream being written to.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEPIPE\fR\fR
.ad
.RS 11n
-.rt
An attempt is made to write to a pipe or a \fBFIFO\fR that is not open for
reading by any process, or that has only one end open (or to a file descriptor
created by \fBsocket\fR(3SOCKET), using type \fBSOCK_STREAM\fR that is no
@@ -491,12 +463,10 @@ or ignore the signal.
.sp
.ne 2
-.mk
.na
\fB\fBERANGE\fR\fR
.ad
.RS 11n
-.rt
The transfer request size was outside the range supported by the streams file
associated with \fIfildes\fR.
.RE
@@ -506,23 +476,19 @@ associated with \fIfildes\fR.
The \fBwrite()\fR and \fBpwrite()\fR functions will fail if:
.sp
.ne 2
-.mk
.na
\fB\fBEFAULT\fR\fR
.ad
.RS 10n
-.rt
The \fIbuf\fR argument points to an illegal address.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEINVAL\fR\fR
.ad
.RS 10n
-.rt
The \fInbyte\fR argument overflowed an \fBssize_t\fR.
.RE
@@ -531,12 +497,10 @@ The \fInbyte\fR argument overflowed an \fBssize_t\fR.
The \fBpwrite()\fR function fails and the file pointer remains unchanged if:
.sp
.ne 2
-.mk
.na
\fB\fBESPIPE\fR\fR
.ad
.RS 10n
-.rt
The \fIfildes\fR argument is associated with a pipe or FIFO.
.RE
@@ -545,36 +509,30 @@ The \fIfildes\fR argument is associated with a pipe or FIFO.
The \fBwrite()\fR and \fBwritev()\fR functions may fail if:
.sp
.ne 2
-.mk
.na
\fB\fBEINVAL\fR\fR
.ad
.RS 10n
-.rt
The stream or multiplexer referenced by \fIfildes\fR is linked (directly or
indirectly) downstream from a multiplexer.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBENXIO\fR\fR
.ad
.RS 10n
-.rt
A request was made of a non-existent device, or the request was outside the
capabilities of the device.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBENXIO\fR\fR
.ad
.RS 10n
-.rt
A hangup occurred on the stream being written to.
.RE
@@ -588,12 +546,10 @@ error message.
The \fBwritev()\fR function may fail if:
.sp
.ne 2
-.mk
.na
\fB\fBEINVAL\fR\fR
.ad
.RS 10n
-.rt
The \fIiovcnt\fR argument was less than or equal to 0 or greater than
{\fBIOV_MAX\fR}; one of the \fBiov_len\fR values in the \fIiov\fR array was
negative; or the sum of the \fBiov_len\fR values in the \fIiov\fR array
@@ -613,17 +569,16 @@ See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
.TS
-tab() box;
-cw(2.75i) |cw(2.75i)
-lw(2.75i) |lw(2.75i)
-.
-ATTRIBUTE TYPEATTRIBUTE VALUE
+box;
+c | c
+l | l .
+ATTRIBUTE TYPE ATTRIBUTE VALUE
_
-Interface StabilityCommitted
+Interface Stability Committed
_
-MT-Level\fBwrite()\fR is Async-Signal-Safe
+MT-Level \fBwrite()\fR is Async-Signal-Safe
_
-StandardSee \fBstandards\fR(5).
+Standard See \fBstandards\fR(5).
.TE
.SH SEE ALSO