File:  [Research Unix] / researchv10dc / dist / man / v4 / man2 / open.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 OPEN II 8/5/73
.sh NAME
open \*- open for reading or writing
.sh SYNOPSIS
(open = 5.)
.br
.ft B
sys open; name; mode
.s3
open(name, mode)
.br
char *name;
.ft R
.sh DESCRIPTION
.it Open
opens the file
.it name
for reading
(if
.it mode
is 0),
writing (if
.it mode
is 1) or for both reading and writing
(if
.it mode
is 2).
.it Name
is the address of a string of ASCII characters representing
a path name, terminated by a null character.
.s3
The returned file descriptor should be saved for subsequent calls
to
.it read,
.it write,
and
.it close.
.sh "SEE ALSO"
creat(II), read(II), write(II), close(II)
.sh DIAGNOSTICS
The error bit
(c-bit) is set if the file does not exist,
if one of the necessary directories
does not exist or is unreadable, if the file is not
readable (resp. writable), or if 10 files are open.
From C, a \*-1 value is returned on an error.

unix.superglobalmegacorp.com

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