Next: close, Up: List of Supported Calls
int open(const char *pathname, int flags);
int open(const char *pathname, int flags, mode_t mode);
flags is the bitwise OR of the following values:
O_CREATO_EXCLO_CREAT, if the file already exists it is
an error and open() fails.
O_TRUNCO_RDWR or O_WRONLY is given) it will be
truncated to zero length.
O_APPENDO_RDONLYO_WRONLYO_RDWROther bits are silently ignored.
mode is the bitwise OR of the following values:
S_IRUSRS_IWUSRS_IRGRPS_IWGRPS_IROTHS_IWOTHOther bits are silently ignored.
open returns the new file descriptor or -1 if an error
occurred.
EEXISTO_CREAT and O_EXCL were used.
EISDIREACCESENAMETOOLONGENOENTENODEVEROFSEFAULTENOSPCEMFILEENFILEEINTR