1 /* Begin Include file fcntl.h */ 2 3 /* @(#)fcntl.h 1.1 */ 4 /* 3.0 SID # 1.2 */ 5 /* Flag values accessible to open(2) and fcntl(2) */ 6 /* (The first three can only be set by open) */ 7 8 9 #define O_RDONLY 0 10 #define O_WRONLY 1 11 #define O_RDWR 2 12 #define O_NDELAY 04 /* Non-blocking I/O */ 13 #define O_APPEND 010 /* append (writes guaranteed at the end) */ 14 15 /* Flag values accessible only to open(2) */ 16 #define O_CREAT 00400 /* open with file create (uses third open arg)*/ 17 #define O_TRUNC 01000 /* open with truncation */ 18 #define O_EXCL 02000 /* exclusive open */ 19 20 /* fcntl(2) requests */ 21 #define F_DUPFD 0 /* Duplicate fildes */ 22 #define F_GETFD 1 /* Get fildes flags */ 23 #define F_SETFD 2 /* Set fildes flags */ 24 #define F_GETFL 3 /* Get file flags */ 25 #define F_SETFL 4 /* Set file flags */ 26 27 /* End Include file fcntl.h */