Go to the first, previous, next, last section, table of contents.


fcntl

Syntax

#include <fcntl.h>

int fcntl (int fd, int cmd, ...);

Description

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.

Return Value

If invalid cmd or fd was passed, it returns -1. In case F_DUPFD, it returns new descriptor or -1 for error.

Portability

not ANSI, POSIX


Go to the first, previous, next, last section, table of contents.