0

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.

Shanif Ansari
  • 239
  • 2
  • 9
  • Possible duplicate of [dup2 / dup - why would I need to duplicate a file descriptor?](https://stackoverflow.com/questions/11635219/dup2-dup-why-would-i-need-to-duplicate-a-file-descriptor) – rob mayoff Aug 21 '17 at 15:00
  • Also https://stackoverflow.com/questions/1720535/practical-examples-use-dup-or-dup2 – rob mayoff Aug 21 '17 at 15:00

0 Answers0