summaryrefslogtreecommitdiff
path: root/static/v10/man2/write.2
diff options
context:
space:
mode:
Diffstat (limited to 'static/v10/man2/write.2')
-rw-r--r--static/v10/man2/write.254
1 files changed, 54 insertions, 0 deletions
diff --git a/static/v10/man2/write.2 b/static/v10/man2/write.2
new file mode 100644
index 00000000..26e8277d
--- /dev/null
+++ b/static/v10/man2/write.2
@@ -0,0 +1,54 @@
+.TH WRITE 2
+.CT 2 file_io comm_proc
+.SH NAME
+write \(mi write on a file
+.SH SYNOPSIS
+.nf
+.B int write(fildes, buffer, nbytes)
+.B char *buffer;
+.fi
+.SH DESCRIPTION
+.I Write
+writes
+.I nbytes
+bytes of data starting at
+.I buffer
+to the file associated with
+.I fildes
+at the file pointer location.
+The file pointer is advanced by the number of bytes written.
+.PP
+The number of characters actually written is returned.
+It should be regarded as an error
+if this is not the same as requested.
+.PP
+If
+.IR fildes
+refers to an append-only file (see
+.IR stat (2)),
+the file pointer is set to the end of the
+file before writing.
+.PP
+Writes which are aligned with file system blocks
+are more efficient than others; see
+.IR filsys (5).
+.SH "SEE ALSO"
+.IR creat (2),
+.IR open (2),
+.IR pipe (2),
+.IR select (2)
+.SH DIAGNOSTICS
+.BR EBADF ,
+.BR EFAULT ,
+.BR EINTR ,
+.BR EINVAL ,
+.BR EIO ,
+.BR ELAB ,
+.BR ENXIO ,
+.BR EPIPE ,
+.BR EROFS
+.SH BUGS
+A
+.I write
+call may fail because of a prior call to
+.IR lseek .