dup2fd added for fcntl syscall