On 09/10/2010 12:59 PM, Paul Eggert wrote:
The motivation for this is that I'm putting GNU tar on a file-descriptor
diet, and I needed O_CLOEXEC, which gnulib sometimes doesn't define.
It's more convenient for tar if gnulib defines O_CLOEXEC to 0 on platforms
that lack it, which is what gnulib already does for the other O_* flags.

This patch also adds O_EXEC.  GNU tar doesn't need that, but might as well
add it while I'm in the neighborhood.

Ultimately, I would like to patch gnulib to support O_CLOEXEC even on systems that lack it (such support would be via a non-atomic call to fcntl after the fact but before the fd is given to the caller). But this looks decent in the meantime.

--
Eric Blake   [email protected]    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Reply via email to