#include <fcntl.h> int fcntl (int fd, int cmd, ...);
This function performs the operation specified by cmd on
fd. Note that it only supports F_DUPFD
which acts like
dup(fd)
(see section dup) but searches empty descriptor from
additional argument.
If invalid cmd or fd was passed, it returns -1. In case F_DUPFD, it returns new descriptor or -1 for error.
not ANSI, POSIX
Go to the first, previous, next, last section, table of contents.