File:  [Research Unix] / researchv10dc / dist / man / v4 / man2 / write.2
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:34 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Dan Cross

.th WRITE II 8/5/73
.sh NAME
write \*- write on a file
.sh SYNOPSIS
(write = 4.)
.br
(file descriptor in r0)
.br
.ft B
sys  write; buffer; nbytes
.s3
write(fildes, buffer, nbytes)
.br
char *buffer;
.ft R
.sh DESCRIPTION
A file descriptor is a word returned from a
successful
.it open,
.it creat
or
.it pipe
call.
.s3
.it Buffer
is the address of
.it nbytes
contiguous
bytes which are written on the output file.
The number of characters actually written is returned (in r0).
It should be regarded as an error
if this is not the same as requested.
.s3
Writes which are multiples
of 512 characters long and begin on a 512-byte boundary
are more efficient than any others.
.sh "SEE ALSO"
creat(II), open(II), pipe(II)
.sh DIAGNOSTICS
The error bit
(c-bit) is set on an error: bad descriptor, buffer address, or
count; physical I/O errors.
From C, a returned value of \*-1 indicates an error.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.