2.9BSD/usr/man/cat2/write.2
WRITE(2) UNIX Programmer's Manual WRITE(2)
NAME
write - write on a file
SYNOPSIS
write(fildes, buffer, nbytes)
char *buffer;
unsigned nbytes;
DESCRIPTION
A file descriptor is a word returned from a successful _o_p_e_n,
_c_r_e_a_t, _d_u_p, or _p_i_p_e(2) call.
_B_u_f_f_e_r is the address of _n_b_y_t_e_s contiguous bytes which are
written on the output file. The number of characters actu-
ally written is returned. It should be regarded as an error
if this is not the same as requested.
Writes which are multiples of 1024 characters long and begin
on a 1024-byte boundary in the file are more efficient than
any others.
ERRORS
_W_r_i_t_e will fail if one or more of the following is true:
[EBADF] _F_i_l_d_e_s is not a valid descriptor open
for writing.
[EPIPE] Ann attempts is made to write to a piipe
that is not open for reading by any pro-
cess.
[EFBIG] An attempt was made to write a file that
exceeds the maximum file size.
[EQUOT] An attempt was made to write a file that
exceeds a quota governing the file.
SEE ALSO
creat(2), open(2), pipe(2)
ASSEMBLER
(write = 4.)
(file descriptor in r0)
sys write; buffer; nbytes
(byte count in r0)
Printed 5/22/83 1