int fcntl(int fd,F_DUPFD,.../int arg/).
The fcntl function in unix programming uses F_DUPFD file descriptor flag.The f_DUPFD clears the FD_CLOEXEC file descriptor for the next lowest available file descriptor. This new file descriptor has the same file table entry as that of fd.
What I need is a practical exxample of the implementation of int fcntl(int fd,F_DUPFD,.../int arg/) with proper explanation.