RTEMS Logo

RTEMS 4.7.2 On-Line Library


Input and Output Primitives Manager dup - Duplicates an open file descriptor

PREV UP NEXT Bookshelf 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.

NOTES:

NONE


PREV UP NEXT Bookshelf RTEMS POSIX API User's Guide

Copyright © 1988-2004 OAR Corporation