summaryrefslogtreecommitdiff
path: root/static/unix-v10/man2/write.2
diff options
context:
space:
mode:
authorJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-26 16:38:00 -0400
committerJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-26 16:38:00 -0400
commit97d5c458cfa039d857301e1ca7d5af3beb37131d (patch)
treeb460cd850d0537eb71806ba30358840377b27688 /static/unix-v10/man2/write.2
parentb89dc2331a50c63f8b33272a5c4c61ab98abdaa3 (diff)
build: Better Build System
Diffstat (limited to 'static/unix-v10/man2/write.2')
-rw-r--r--static/unix-v10/man2/write.254
1 files changed, 54 insertions, 0 deletions
diff --git a/static/unix-v10/man2/write.2 b/static/unix-v10/man2/write.2
new file mode 100644
index 00000000..26e8277d
--- /dev/null
+++ b/static/unix-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 .