01.01.2013 Views

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

OPEN ( 2)<br />

O_TRUNC<br />

O_EXCL<br />

OPEN(2)<br />

user ID, the file's group ID is set to the process's<br />

effective group ID, and the low-order 12 bits of the<br />

file mode are set to the value of mode modified as<br />

follows (see creat(2)):<br />

All bits set in the process's file mode creation<br />

mask are cleared. See umask(2).<br />

The "save text image after execution bit"<br />

of the mode is cleared. See chmod(2).<br />

If the file exists, its length is truncated to 0 and<br />

the mode and owner are unchanged.<br />

If O_EXCL and O_CREAT are set, open will fail if<br />

the file exists.<br />

Upon successful completion a non-negative integer, the file<br />

descriptor, is returned.<br />

The file pointer used to mark the current position within the file is<br />

set to the beginning of the file.<br />

The new file descriptor is set to remain open across exec system<br />

calls. See fcntl(2).<br />

No process may have more than 80 file descriptors open simultaneously.<br />

The named file is opened unless one or more of the following are<br />

true:<br />

A component of the path prefix is not a directory.<br />

[ENOTDIR]<br />

O_CREAT is not set and the named file does not exist.<br />

[ENOENT[<br />

A component of the path prefix denies search permission.<br />

[EACCESJ<br />

Oflag permission is denied for the named file. [EACCESJ<br />

The named file is a directory and oflag is write or<br />

read/write. [EISDIR[<br />

The named file resides on a read-only file system and<br />

oflag is write or read/write. [EROFS]<br />

Eighty (80) file descriptors are currently open. ]EMFILE]<br />

The named file is a character special or block special file,<br />

and the device associated with this special file does not<br />

exist. [ENXIO]<br />

The file is a pure procedure (shared text) file that is being �<br />

executed and oflag is write or read/write. [ETXTBSYJ �<br />

Path points outside the process's allocated address space.<br />

JEFAULT]<br />

O_CREAT and O_EXCL are set, and the named file exists.<br />

[EEXIST]<br />

- 2-

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!