sl@0: /** @file ../include/sys/fcntl.h sl@0: @internalComponent sl@0: */ sl@0: sl@0: /** @fn open(const char *file, int flags, ...) sl@0: @param file sl@0: @param flags sl@0: @param ... sl@0: @return If successful, open returns a non-negative integer, termed a file descriptor. It returns sl@0: -1 on failure and sets errno to indicate the error. sl@0: sl@0: The file name specified by file is opened for reading and/or writing, as specified by the argument flags , and the file descriptor returned to the calling process. The flags argument may indicate that the file is to be created if it does sl@0: not exist (by specifying the O_CREAT flag). In this case open requires a third argument, mode_t mode , and the file is created with mode as described in chmod and modified by the process' umask sl@0: value (see umask ) sl@0: sl@0: sl@0: sl@0: The flags specified are formed by OR'ing the following values sl@0: sl@0: @code sl@0: sl@0: O_RDONLYopen for reading only sl@0: O_WRONLYopen for writing only sl@0: O_RDWRopen for reading and writing sl@0: O_NONBLOCKdo not block on open sl@0: O_APPENDappend on each write sl@0: O_CREATcreate file if it does not exist sl@0: O_TRUNCtruncate size to 0 sl@0: O_EXCLerror if create and file exists sl@0: O_SHLOCKatomically obtain a shared lock sl@0: O_EXLOCKatomically obtain an exclusive lock sl@0: O_DIRECTeliminate or reduce cache effects sl@0: O_FSYNCsynchronous writes sl@0: O_NOFOLLOWdo not follow symlinks sl@0: Following options are currently not supported : sl@0: O_NONBLOCK, O_SHLOCK, O_EXLOCK, O_DIRECT, O_FSYNC, O_NOFOLLOW. sl@0: @endcode sl@0: O_LARGEFILE sl@0: This flag, if passed into the open() API, enables it to open a large file (files with 64 bit file sizes) sl@0: sl@0: sl@0: Opening a file with O_APPEND set causes each write on the file sl@0: to be appended to the end. sl@0: sl@0: If O_TRUNC is specified, and the file exists, the file is truncated to sl@0: zero length. sl@0: sl@0: If O_EXCL is set with O_CREAT and the file already sl@0: exists, open returns an error. sl@0: This may be used to sl@0: implement a simple exclusive access locking mechanism. sl@0: sl@0: If O_EXCL is set and the last component of the pathname is sl@0: a symbolic link, open will fail even if the symbolic sl@0: link points to a non-existent name. sl@0: sl@0: If the O_NONBLOCK flag is specified and the open system call would result in the process being blocked for some sl@0: reason (e.g., waiting for carrier on a dialup line), open returns immediately. The descriptor remains in non-blocking mode sl@0: for subsequent operations. This mode need not have any effect on files other sl@0: than FIFOs. sl@0: sl@0: If O_FSYNC is used in the mask all writes will immediately be written sl@0: to disk, the kernel will not cache written data and all writes on the descriptor sl@0: will not return until the data to be written completes. sl@0: sl@0: If O_NOFOLLOW is used in the mask and the target file passed to open is a symbolic link the open will fail. sl@0: sl@0: When opening a file, a lock with flock semantics can be obtained by setting O_SHLOCK for a shared lock or O_EXLOCK for an exclusive lock. If creating a file with O_CREAT, the request for the lock will never fail (provided that the sl@0: underlying file system supports locking). sl@0: sl@0: O_DIRECT may be used to minimize or eliminate the cache effects of sl@0: reading and writing. The system will attempt to avoid caching the data being sl@0: read or written. If it cannot avoid caching the data, it will minimize the impact sl@0: the data has on the cache. Use of this flag can drastically reduce performance sl@0: if not used with care. sl@0: sl@0: If successful, open returns a non-negative integer termed a file descriptor. It returns sl@0: -1 on failure. The file pointer used to mark the current position within the sl@0: file is set to the beginning of the file. sl@0: sl@0: When a new file is created it is given the group of the directory sl@0: which contains it. sl@0: sl@0: The new descriptor is set to remain open across execve system calls.; See close and fcntl . sl@0: sl@0: The system imposes a limit on the number of file descriptors sl@0: open simultaneously by one process. sl@0: The getdtablesize system call returns the current system limit. sl@0: sl@0: sl@0: sl@0: Notes: sl@0: sl@0: 1) Mode values for group and others are ignored sl@0: sl@0: 2) Execute bit and setuid on exec bit are ignored. sl@0: sl@0: 3) The default working directory of a process is initalized to C: \\private\\UID sl@0: (UID of the calling application) and any data written into this directory persists sl@0: between phone resets. sl@0: sl@0: 4) If the specified file is a symbolic link and the file it is pointing to sl@0: is invalid, the symbolic link file will be automatically removed. sl@0: sl@0: 5) A file in cannot be created with write-only permissions. Attempting to create sl@0: a file with write-only permissions will result in a file with read-write permission. sl@0: sl@0: 6) Creating a new file with the O_CREAT flag does not alter the time stamp sl@0: of the parent directory. sl@0: sl@0: 7) A file has only two time stamps: access and modification. Creation time sl@0: stamp of the file is not supported and access time stamp is initially set equal sl@0: to modification time stamp. sl@0: sl@0: 8) Users should not use O_DIRECT flag as the underlying implementation makes explicit sl@0: use of O_DIRECT by default. Instead if the users want to use read/write sl@0: buffering they can use O_BUFFERED. sl@0: sl@0: 9) Users should not use O_BINARY flag as the underlying implementation opens a file sl@0: in binary mode by default. Instead if the users want to open the file in text mode sl@0: they can use O_TEXT. sl@0: sl@0: Examples: sl@0: @code sl@0: /* This example creates a file in the current working directory and sl@0: * opens it in read-write mode. */ sl@0: #include sl@0: #include sl@0: #include sl@0: int main() sl@0: { sl@0: int fd = 0; sl@0: fd = open("Example.txt" , O_CREAT | O_EXCL , 0666); sl@0: if(fd < 0 ) sl@0: { sl@0: printf("Failed to create and open file in current working directory sl@0: "); sl@0: return -1; sl@0: } sl@0: printf("File created and opened in current working directory sl@0: " ); sl@0: return 0; sl@0: } sl@0: sl@0: @endcode sl@0: Output sl@0: @code sl@0: File created and opened in current working directory sl@0: sl@0: @endcode sl@0: @see chmod() sl@0: @see close() sl@0: @see dup() sl@0: @see getdtablesize() sl@0: @see lseek() sl@0: @see read() sl@0: @see umask() sl@0: @see write() sl@0: @see fopen() sl@0: sl@0: Limitations: sl@0: sl@0: KErrNotReady of Symbian error code is mapped to ENOENT, which typically means drive sl@0: not found or filesystem not mounted on the drive. sl@0: sl@0: @capability Deferred @ref RFs::Entry(const TDesC16&, TEntry&) const sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: sl@0: /** @fn open64(const char *file, int flags, ...) sl@0: @param file sl@0: @param flags sl@0: @param ... sl@0: @return If successful, open64() returns a non-negative integer, termed a file descriptor. It returns sl@0: -1 on failure and sets errno to indicate the error. sl@0: sl@0: sl@0: For full documentation see: http://www.unix.org/version2/whatsnew/lfs20mar.html#3.0 sl@0: sl@0: @see open() sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /**@typedef typedef __off_t off64_t; sl@0: sl@0: Large file offsets. sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @fn creat(const char *file, mode_t mode) sl@0: @param file sl@0: @param mode sl@0: @return open and creat return the new file descriptor, or -1 if an error occurred (in sl@0: which case errno is set appropriately). sl@0: sl@0: This interface is made obsolete by: open sl@0: sl@0: The creat function sl@0: is the same as: open(path, O_CREAT | O_TRUNC | O_WRONLY, mode); Limitation :Creating a new file doesn't alter the time stamp of parent directory, created entry has only two time stamps access and modification timestamps. sl@0: Creation time stamp of the file is not supported, here accesstime stamp is equal to modification time stamp. sl@0: sl@0: Examples: sl@0: @code sl@0: /* Detailed description : This test code demonstrates creat system call usage, it creates a sl@0: * in current working directory(if file exists then it is truncated. Preconditions : None */ sl@0: #include sl@0: #include sl@0: #include sl@0: int main() sl@0: { sl@0: int fd = 0; sl@0: fd = creat("Example.txt" , 0666); sl@0: if(fd < 0 ) sl@0: { sl@0: printf("File creation failed sl@0: "); sl@0: return -1; sl@0: } sl@0: printf("Example.txt file created sl@0: "); sl@0: return 0; sl@0: } sl@0: sl@0: @endcode sl@0: Output sl@0: @code sl@0: Example.txt file created sl@0: sl@0: @endcode sl@0: @see open() sl@0: sl@0: Limitations: sl@0: sl@0: KErrNotReady of Symbian error code is mapped to ENOENT, which typically means drive sl@0: not found or filesystem not mounted on the drive. sl@0: sl@0: @capability Deferred @ref RFs::Entry(const TDesC16&, TEntry&) const sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @fn creat64(const char *file, mode_t mode) sl@0: @param file sl@0: @param mode sl@0: @return creat64() returns the new file descriptor, or -1 if an error occurred (in sl@0: which case errno is set appropriately). sl@0: sl@0: For full documentation see: http://www.unix.org/version2/whatsnew/lfs20mar.html#3.0 sl@0: sl@0: @see creat() sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @fn fcntl(int aFid, int aCmd, ...) sl@0: @param aFid sl@0: @param aCmd sl@0: @param ... sl@0: @return Upon successful completion, the value returned depends on cmd as follows: F_DUPFD A new file descriptor. F_GETFD Value of flag (only the low-order bit is defined). F_GETFL Value of flags. F_GETOWN Value of file descriptor owner (Not supported). other Value other than -1. Otherwise, a value of -1 is returned and errno is set to indicate the error. sl@0: sl@0: @code sl@0: The fcntl system call provides for control over descriptors. The argument fd is a descriptor to be operated on by cmd as described below. Depending on the value of cmd, fcntl can take an additional third argument int arg. sl@0: sl@0: F_DUPFD Return a new descriptor as follows: Lowest numbered available descriptor greater than or equal to arg. Same object references as the original descriptor. New descriptor shares the same file offset if the object sl@0: was a file. Same access mode (read, write or read/write). Same file status flags (i.e., both file descriptors sl@0: share the same file status flags). The close-on-exec flag associated with the new file descriptor sl@0: is set to remain open across execve sl@0: system calls. sl@0: sl@0: Limitations: sl@0: sl@0: The difference between two file descriptors passed must not sl@0: be greater than 8. If the difference is greater than 8 then behaviour of sl@0: fcntl system call is undefined.F_SELKW flag is not supported because of underlying platform limitations. sl@0: F_RDLCK is not supported because the native platform only supports exclusive locks and not shared locks. sl@0: sl@0: sl@0: @code sl@0: sl@0: O_NONBLOCK Non-blocking I/O; if no data is available to a read system call, or if a write operation would block, the read or sl@0: write call returns -1 with the error EAGAIN. (This flag is Not supported for files) sl@0: O_APPEND Force each write to append at the end of file; sl@0: corresponds to the O_APPEND flag of open . sl@0: (Setting this flag in fcntl currently has no effect on subsequent write system calls) sl@0: O_DIRECT Minimize or eliminate the cache effects of reading and writing. The system sl@0: will attempt to avoid caching data during read or write. If it cannot avoid sl@0: caching the data it will minimize the impact the data has on the cache. sl@0: Use of this flag can drastically reduce performance if not used with care sl@0: (Not supported). sl@0: O_ASYNC Enable the SIGIO signal to be sent to the process group when I/O is possible, sl@0: e.g. upon availability of data to be read (Not supported). sl@0: sl@0: F_GETLK Get the first lock that blocks the lock description pointed to by the sl@0: third argument, arg, taken as a pointer to a struct flock (see above). sl@0: The information retrieved overwrites the information passed to fcntl in the flock structure. sl@0: If no lock is found that would prevent this lock from being created, sl@0: the structure is left unchanged by this system call except for the sl@0: lock type which is set to F_UNLCK . sl@0: F_SETLK Set or clear a file segment lock according to the lock description sl@0: pointed to by the third argument, arg, taken as a pointer to a struct flock (see above). sl@0: F_SETLK is used to establish shared (or read) locks ( F_RDLCK )( "F_RDLCK" is not supported) sl@0: or exclusive (or write) locks, ( F_WRLCK, ) as well as remove either type of lock ( F_UNLCK. ) sl@0: If a shared or exclusive lock cannot be set, fcntl returns immediately with EAGAIN. (Not supported) sl@0: sl@0: F_SETLKW This command is the same as F_SETLK except that if a shared or exclusive lock is blocked by other locks, sl@0: the process waits until the request can be satisfied.(Not Supported) sl@0: If a signal that is to be caught is received while fcntl is waiting for a region, the fcntl will be interrupted if the signal handler has not specified the SA_RESTART . (Not supported) sl@0: sl@0: @endcode sl@0: sl@0: The fcntl system call provides for control over descriptors. sl@0: The argument fd is a descriptor to be operated on by cmd as described below. sl@0: Depending on the value of cmd, fcntl can take an additional third argument int arg . F_DUPFD Return a new descriptor as follows: sl@0: sl@0: Lowest numbered available descriptor greater than or equal to arg. Same object references as the original descriptor. New descriptor shares the same file offset if the object sl@0: was a file. Same access mode (read, write or read/write). Same file status flags (i.e., both file descriptors sl@0: share the same file status flags). The close-on-exec flag associated with the new file descriptor sl@0: is set to remain open across execve sl@0: system calls. Limitation: The difference between two file descriptors passed must not sl@0: be greater than 8. If the difference is greater than 8 then behaviour of sl@0: fcntl system call is undefined. F_GETFD Get the close-on-exec flag associated with the file descriptor fd as FD_CLOEXEC. If the returned value ANDed with FD_CLOEXEC is 0 the file will remain open across exec, otherwise the file will be closed upon execution of exec (arg is ignored). F_SETFD Set the close-on-exec flag associated with fd to arg, where arg is either 0 or FD_CLOEXEC, as described above. F_GETFL Get descriptor status flags, as described below (arg is ignored). F_SETFL Set descriptor status flags to arg . F_GETOWN Get the process ID or process group currently receiving SIGIO and SIGURG signals. Process groups are returned as negative values (arg is ignored)(Not supported). F_SETOWN Set the process or process group to receive SIGIO and SIGURG signals. Process groups are specified by supplying arg as negative, otherwise arg is interpreted as a process ID (Not supported). sl@0: sl@0: The flags for the F_GETFL and F_SETFL flags are as follows: O_NONBLOCK No n-blocking I/O; if no data is available to a read system call, or if a write operation would block, the read or sl@0: write call returns -1 with the error EAGAIN. (This flag is Not supported for files) O_APPEND Force each write to append at the end of file; sl@0: corresponds to the O_APPEND flag of open . sl@0: (Setting this flag in fcntl currently has no effect on subsequent write system calls) O_DIRECT Minimize or eliminate the cache effects of reading and writing. The system sl@0: will attempt to avoid caching data during read or write. If it cannot avoid sl@0: caching the data it will minimize the impact the data has on the cache. sl@0: Use of this flag can drastically reduce performance if not used with care sl@0: (Not supported). O_ASYNC Enable the SIGIO signal to be sent to the process group when I/O is possible, sl@0: e.g. upon availability of data to be read (Not supported). sl@0: sl@0: Several commands are available for doing advisory file locking; sl@0: they all operate on the following structure: sl@0: sl@0: @code sl@0: sl@0: struct flock { sl@0: off_tl_start;/* starting offset */ sl@0: off_tl_len;/* len = 0 means until end of file */ sl@0: pid_tl_pid;/* lock owner */ sl@0: shortl_type;/* lock type: read/write, etc. */ sl@0: shortl_whence;/* type of l_start */ sl@0: }; sl@0: sl@0: @endcode sl@0: sl@0: The commands available for advisory record locking are as follows: sl@0: sl@0: F_GETLK Get the first lock that blocks the lock description pointed to by the sl@0: third argument, arg, taken as a pointer to a struct flock (see above). sl@0: The information retrieved overwrites the information passed to fcntl in the flock structure. sl@0: If no lock is found that would prevent this lock from being created, sl@0: the structure is left unchanged by this system call except for the sl@0: lock type which is set to F_UNLCK . sl@0: sl@0: F_SETLK Set or clear a file segment lock according to the lock description sl@0: pointed to by the third argument, arg, taken as a pointer to a struct flock (see above). sl@0: F_SETLK is used to establish shared (or read) locks ( F_RDLCK ) . Note "F_RDLCK" is not supported) sl@0: or exclusive (or write) locks, ( F_WRLCK, ) as well as remove either type of lock ( F_UNLCK. ) sl@0: If a shared or exclusive lock cannot be set, fcntl returns immediately with EAGAIN. (Not supported) sl@0: sl@0: F_SETLKW This command is the same as F_SETLK except that if a shared or exclusive lock is blocked by other locks, sl@0: the process waits until the request can be satisfied. sl@0: If a signal that is to be caught is received while fcntl is waiting for a region, the fcntl will be interrupted if the signal handler has not specified the SA_RESTART . (Not supported) sl@0: sl@0: When a shared lock has been set on a segment of a file,other processes can set shared locks on that segment sl@0: or a portion of it.A shared lock prevents any other process from setting an exclusive lock on any portion of the protected area. sl@0: A request for a shared lock fails if the file descriptor was not opened with read access. sl@0: sl@0: An exclusive lock prevents any other process from setting a shared lock or an exclusive lock on any portion of the protected area. sl@0: A request for an exclusive lock fails if the file was not opened with write access. sl@0: sl@0: The value of l_whence is SEEK_SET, SEEK_CUR, or SEEK_END to indicate that the relative offset, l_start bytes, will be measured from the start of the file, sl@0: current position, or end of the file, respectively. sl@0: The value of l_len is the number of consecutive bytes to be locked. sl@0: If l_len is negative, l_start means end edge of the region. sl@0: The l_pid field is only used with F_GETLK to return the process ID of the process holding a blocking lock .( Not Supported ) sl@0: After a successful F_GETLK request, the value of l_whence is SEEK_SET. sl@0: sl@0: Locks may start and extend beyond the current end of a file, sl@0: but may not start or extend before the beginning of the file. sl@0: A lock is set to extend to the largest possible value of the sl@0: file offset for that file if l_len is set to zero. sl@0: If l_whence and l_start point to the beginning of the file, and l_len is zero, the entire file is locked. sl@0: If an application wishes only to do entire file locking, the flock system call is much more efficient. sl@0: sl@0: There is at most one type of lock set for each byte in the file. sl@0: Before a successful return from an F_SETLK or an F_SETLKW ( Not Supported ) request when the calling process has previously existing locks on bytes in the region specified by the request, sl@0: the previous lock type for each byte in the specified sl@0: region is replaced by the new lock type. sl@0: As specified above under the descriptions sl@0: of shared locks and exclusive locks, an F_SETLK or an F_SETLKW request fails or blocks respectively when another process has existing sl@0: locks on bytes in the specified region and the type of any of those sl@0: locks conflicts with the type specified in the request. sl@0: sl@0: This interface follows the completely stupid [sic] semantics of System sl@0: V and -p1003.1-88 that require that all locks associated with a file for a sl@0: given process are removed when any file descriptor for that file is closed by that process. This semantic sl@0: means that applications must be aware of any files that a subroutine library sl@0: may access. For example if an application for updating the password file locks sl@0: the password file database while making the update, and then calls getpwnam to retrieve a record, the lock will sl@0: be lost because getpwnam opens, reads, and closes the password sl@0: database. The database close will release all locks that the process has associated sl@0: with the database, even if the library routine never requested a lock on the sl@0: database. Another minor semantic problem with this interface is that locks are sl@0: not inherited by a child process created using the fork system sl@0: call. The flock interface has much more rational last close semantics and allows locks to be sl@0: inherited by child processes. The flock system call is recommended for applications that want to ensure the integrity sl@0: of their locks when using library routines or wish to pass locks to their children. sl@0: sl@0: The fcntl, flock , sl@0: and lockf locks are compatible. sl@0: Processes using different locking interfaces can cooperate sl@0: over the same file safely. sl@0: However, only one of such interfaces should be used within sl@0: the same process. sl@0: If a file is locked by a process through flock , sl@0: any record within the file will be seen as locked sl@0: from the viewpoint of another process using fcntl or lockf , sl@0: and vice versa. sl@0: Note that fcntl (F_GETLK); returns -1 in l_pid if the process holding a blocking lock previously locked the sl@0: file descriptor by flock . sl@0: sl@0: All locks associated with a file for a given process are sl@0: removed when the process terminates. sl@0: sl@0: All locks obtained before a call to execve remain in effect until the new program releases them. sl@0: If the new program does not know about the locks, they will not be sl@0: released until the program exits. sl@0: sl@0: A potential for deadlock occurs if a process controlling a locked region sl@0: is put to sleep by attempting to lock the locked region of another process. sl@0: This implementation detects that sleeping until a locked region is unlocked sl@0: would cause a deadlock and fails with an EDEADLK error. sl@0: sl@0: If 'aFid' corresponds to a shared memory object the only values of cmd that are supported are sl@0: F_DUPFD, F_GETFD, F_SETFD, F_SETFL, F_GETFL. sl@0: sl@0: Examples: sl@0: @code sl@0: /* Detailed description : Sample usafe of fcntl system call */ sl@0: #include sl@0: #include sl@0: int main() sl@0: { sl@0: int fd = 0; sl@0: int flags = 0; sl@0: fd = open("Example.txt " , O_CREAT | O_RDWR , 0666); sl@0: if(fd < 0 ) sl@0: { sl@0: printf("Failed to open file Example.txt sl@0: "); sl@0: return -1; sl@0: } sl@0: if( (flags = fcntl(fd , F_GETFL) ) < 0 ) sl@0: { sl@0: printf("Fcntl system call failed sl@0: "); sl@0: return -1; sl@0: } sl@0: printf("Flags of the file %o sl@0: " , flags); sl@0: return 0; sl@0: } sl@0: sl@0: @endcode sl@0: Output sl@0: @code sl@0: Flags of the file 2 sl@0: sl@0: @endcode sl@0: @see close() sl@0: @see flock() sl@0: @see getdtablesize() sl@0: @see open() sl@0: sl@0: sl@0: sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: sl@0: /** @def O_RDONLY sl@0: sl@0: open for reading only sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def O_WRONLY sl@0: sl@0: open for writing only sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def O_RDWR sl@0: sl@0: open for reading and writing sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: sl@0: /** @def O_ACCMODE sl@0: sl@0: mask for above modes sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def O_NONBLOCK sl@0: sl@0: no delay sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def O_APPEND sl@0: sl@0: set append mode sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def O_CREAT sl@0: sl@0: create if nonexistent sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def O_TRUNC sl@0: sl@0: truncate to zero length sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: sl@0: /** @def O_EXCL sl@0: sl@0: error if already exists sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def O_NOCTTY sl@0: sl@0: don't assign controlling terminal sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def F_DUPFD sl@0: sl@0: Duplicate file descriptor. sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: sl@0: /** @def F_GETFD sl@0: sl@0: Get file descriptor flags. sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def F_SETFD sl@0: sl@0: set file descriptor flags sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def F_GETFL sl@0: sl@0: get file status flags sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def F_SETFL sl@0: sl@0: set file status flags sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def F_GETOWN sl@0: sl@0: get SIGIO/SIGURG proc/pgrp sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def F_SETOWN sl@0: sl@0: set SIGIO/SIGURG proc/pgrp sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def F_GETLK sl@0: sl@0: get record locking information sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: sl@0: /** @def F_SETLK sl@0: sl@0: set record locking information sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def F_SETLKW sl@0: sl@0: F_SETLK; wait if blocked sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def F_GETLK64 sl@0: sl@0: get record locking information of large file sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: sl@0: /** @def F_SETLK64 sl@0: sl@0: set record locking information to a large file sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def F_SETLKW64 sl@0: sl@0: F_SETLK; wait if blocked in a large file sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def F_RDLCK sl@0: sl@0: shared or read lock sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def F_UNLCK sl@0: sl@0: unlock sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def F_WRLCK sl@0: sl@0: exclusive or write lock sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def O_SYNC sl@0: sl@0: POSIX synonym for O_FSYNC sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def FD_CLOEXEC sl@0: sl@0: close-on-exec flag sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: sl@0: /** @def FREAD sl@0: sl@0: Kernel encoding of open mode; separate read and write bits that are independently testable: 1 greater than the above. sl@0: FREAD and FWRITE are excluded from the #ifdef _KERNEL so that TIOCFLUSH, which was documented to use FREAD/FWRITE, continues to work. sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: sl@0: /** @def FWRITE sl@0: sl@0: Kernel encoding of open mode; separate read and write bits that are independently testable: 1 greater than the above. sl@0: FREAD and FWRITE are excluded from the #ifdef _KERNEL so that TIOCFLUSH, which was documented to use FREAD/FWRITE, continues to work. sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: