Input and Output Primitives Manager dup - Duplicates an open file descriptor
RTEMS POSIX API User's Guide
5.4.2: dup - Duplicates an open file descriptor
CALLING SEQUENCE:
#include <unistd.h>
int dup(
int fildes
);
STATUS CODES:
EBADF
Invalid file descriptor.
EINTR
Function was interrupted by a signal.
EMFILE
The process already has the maximum number of file descriptors open
and tried to open a new one.
DESCRIPTION:
The dup function returns the lowest numbered available file
descriptor. This new desciptor refers to the same open file as the
original descriptor and shares any locks.