standards/169962: fcntl() to support F_DUPFD_CLOEXEC specified in POSIX.1-2008

Jilles Tjoelker jilles at stack.nl
Sat Aug 4 20:31:30 UTC 2012


On Wed, Jul 18, 2012 at 08:40:25AM +0000, Jukka Ukkonen wrote:
> >Number:         169962
> >Category:       standards
> >Synopsis:       fcntl() to support F_DUPFD_CLOEXEC specified in POSIX.1-2008

> While in the process of adding F_DUPFD_CLOEXEC which is required by
> POSIX.1-2008 I also added F_DUP2FD_CLOEXEC for symmetry and analogy
> with F_DUPFD<->F_DUP2FD.

Although this is not standardized, it looks like it will be wrappable if
Linux's dup3() is standardized instead of F_DUP2FD_CLOEXEC (which seems
likely because dup3() is a fairly obvious extension to dup2() while
F_DUP2FD is not standardized). This approach avoids adding another
syscall.

-- 
Jilles Tjoelker


More information about the freebsd-standards mailing list