text: NAME
  fcntl -- file control
  LIBRARY
  Standard C Library (libc, -lc)
  SYNOPSIS
  #include <fcntl.h> int fcntl(int fd, int cmd, ...);
  DESCRIPTION
  The fcntl() system call provides for control over descriptors. The argument fd is a descriptor) system calls. F_DUP2FD It is functionally equivalent to dup2(fd, arg) The F_DUP2FD constant is not portable, so it should not be used if portability is needed. Use dup2() instead. negative, otherwise arg is interpreted as a process ID. The flags for the F_GETFL and F_SETFL flags are as follows: O_NONBLOCK Non-blocking I/O; if no data is available to a read(2) system call, or if a write(2) operation would block, the read or write call returns -1 with the error EAGAIN. O_APPEND Force each write to append at the end of file; corresponds to the O_APPEND flag of open(2). O_DIRECT */ int l_sysid; /* remote system id or zero for local */ }; system)). F_READAHEAD Set or clear the read ahead amount for sequential access to the third argument, arg, which is rounded up to the nearest block size. A zero value in arg turns off read ahead. F_RDAHEAD Equivalent to Darwin counterpart which sets read ahead amount of 128KB when the third argument, arg is non-zero. A zero value in arg turns off read ahead.,. database.._DUP2FD A file descriptor equal to arg. already shared- locked or exclusive-locked by another process. [EBADF] The fd argument is not a valid open file descriptor. The argument cmd is F_DUP2FD, and arg is not a valid or F_DUP2FD and the maximum number of. [EOPNOTSUPP] The argument cmd is F_GETLK, F_SETLK or F_SETLKW and fd refers to a file for which locking is not supported.  reasons as stated in tcgetpgrp(3).
  SEE ALSO
  close(2), dup2(2), execve(2), flock(2), getdtablesize(2), open(2), sigvec(2), lockf(3), tcgetpgrp(3), tcsetpgrp(3)
  STANDARDS
  The F_DUP2FD constant is non portable. It is provided for compatibility with AIX and Solaris.
  HISTORY
  The fcntl() system call appeared in 4.2BSD. The F_DUP2FD constant first appeared in FreeBSD 7.1.