HP-UX Reference (11i v1 00/12) - 2 System Calls (vol 5)
__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man2/!!!intro.2
________________________________________________________________
___ ___
o
open(2) open(2)
The following call to open() opens file outputfile for writing and returns a file descriptor for out-
putfile
. For an example of preallocating disk space for outputfile , see the prealloc(2) manual
entry. For an example of writing to outputfile , see the write(2) manual entry.
int outfd;
outfd = open ("outputfile", O_WRONLY);
The following call opens file iofile for synchronized I/O file integrity for reads and writes.
int iofd;
iofd = open ("iofile", O_RDWR|O_SYNC|O_RSYNC);
AUTHOR
open() was developed by HP, AT&T, and the University of California, Berkeley.
SEE ALSO
acl(2), chmod(2), close(2), creat(2), dup(2), fcntl(2), lockf(2), lseek(2), creat64(2), pathconf(2), read(2),
select(2), umask(2), write(2), setacl(2), acl(5), aclv(5), fcntl(5), signal(5), unistd(5).
STANDARDS CONFORMANCE
open(): AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1, POSIX.4
Section 2−−204 − 4 − HP-UX Release 11i: December 2000
___
___