Re: F_DUPFD_CLOEXEC implementation

From: Davide Libenzi
Date: Fri Sep 28 2007 - 14:19:21 EST


On Fri, 28 Sep 2007, Ulrich Drepper wrote:

> One more small change to extend the availability of creation of
> file descriptors with FD_CLOEXEC set. Adding a new command to
> fcntl() requires no new system call and the overall impact on
> code size if minimal.
>
> If this patch gets accepted we will also add this change to the
> next revision of the POSIX spec.
>
> To test the patch, use the following little program. Adjust the
> value of F_DUPFD_CLOEXEC appropriately.

I think new system calls would have been a cleaner way to accomplish this.
The "small pill at a time" may have better chance to go in, but will
likely result in an uglier userspace interface.
In any case, this is better than *nothing*, if it makes it easier to use
fds inside system libraries.



- Davide


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/