fixed it to work on terminals with over 48 lines, and fixed bug
[unix-history] / .ref-BSD-3 / usr / man / man2 / write.2
CommitLineData
9e838ae2
BJ
1.TH WRITE 2
2.SH NAME
3write \- write on a file
4.SH SYNOPSIS
5.B write(fildes, buffer, nbytes)
6.br
7.B char *buffer;
8.SH DESCRIPTION
9A file descriptor is a word returned from a
10successful
11.I open,
12.I creat,
13.I dup,
14or
15.IR pipe (2)
16call.
17.PP
18.I Buffer
19is the address of
20.I nbytes
21contiguous
22bytes which are written on the output file.
23The number of characters actually written is returned.
24It should be regarded as an error
25if this is not the same as requested.
26.PP
27Writes which are multiples
28of 1024 characters long and begin on a 1024-byte boundary
29in the file
30are more efficient than any others.
31.SH "SEE ALSO"
32creat(2), open(2), pipe(2)
33.SH DIAGNOSTICS
34Returns
35\-1 on error: bad descriptor, buffer address, or
36count; physical I/O errors.
37.SH "ASSEMBLER (PDP-11)"
38(write = 4.)
39.br
40(file descriptor in r0)
41.br
42.B sys write; buffer; nbytes
43.br
44(byte count in r0)