On Mon, Mar 29, 2010 at 11:01 PM, Eric Blake wrote:
> Or you could just update to today's gnulib, where your upstream patch
> doing the same thing was accepted.
Done, in the pushed version.
> I find mid-expression #ifdefs hard to read. Better is to do this at
> file scope:
>
> #ifndef O_CLOEXEC
On 03/29/2010 04:01 PM, Eric Blake wrote:
>> * gnulib-local/lib/save-cwd.c.diff: Patch gnulib to set FD_CLOEXEC
>> on the file descriptors opened by save_cwd.
>
> Or you could just update to today's gnulib, where your upstream patch
> doing the same thing was accepted.
>
> I tried testing with yo
On 03/29/2010 04:29 AM, James Youngman wrote:
> +int
> +open_cloexec (const char *path, int flags)
> +{
> + int fd;
> +
One more thing I just thought of: it would be wise to add:
assert ((flags & O_CREAT) == 0);
> + fd = open (path, flags
> +#if defined O_CLOEXEC
> + |O_CLOEXEC
> +#en
On 03/29/2010 04:29 AM, James Youngman wrote:
> * import-gnulib.config (gnulib_version): Update to more recent
> version of gnulib. Import the cloexec module too.
> * lib/fdleak.c: New file; a module for detecting file descriptor
> leaks. Also define an open_cloexec() function.
Hmm - I really s
* import-gnulib.config (gnulib_version): Update to more recent
version of gnulib. Import the cloexec module too.
* lib/fdleak.c: New file; a module for detecting file descriptor
leaks. Also define an open_cloexec() function.
* lib/fdleak.h: Declare the global functions defined in fdleak.c.
* lib