bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] fcntl-h: define O_CLOEXEC and O_EXEC if not defined; use new


From: Eric Blake
Subject: Re: [PATCH] fcntl-h: define O_CLOEXEC and O_EXEC if not defined; use new defines
Date: Fri, 10 Sep 2010 13:03:12 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100806 Fedora/3.1.2-1.fc13 Mnenhy/0.8.3 Thunderbird/3.1.2

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   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]