dup3 syscall - atomic set O_CLOEXEC with dup2

Ed Schouten ed at 80386.nl
Thu Jan 12 10:11:40 UTC 2012


* Ed Schouten <ed at 80386.nl>, 20120112 10:56:
> I suspect that not long after we add dup3(), some random person asks us
> to implement F_DUP3FD. Any chance you can implement this without using a
> system call, but through fcntl()?

Never mind. This seems to be non-trivial, as fcntl() just takes a single
parameter and dup3() requires the newfd and the flags.

-- 
 Ed Schouten <ed at 80386.nl>
 WWW: http://80386.nl/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20120112/7978eba1/attachment.pgp


More information about the freebsd-hackers mailing list