[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Openat without die
From: |
Jim Meyering |
Subject: |
Re: Openat without die |
Date: |
Tue, 11 Jan 2011 21:16:15 +0100 |
Eric Blake wrote:
> On 01/11/2011 12:08 PM, Paul Eggert wrote:
>> On 01/11/11 11:03, Eric Blake wrote:
>>> But you should still drop the xmalloc dependency from the module
>>> description.
>>
>> Hmm, sorry, I guess I should have mentioned that I looked for that,
>> and couldn't find the dependency. The only modules that mention
>> lib/openat-proc.c are fdopendir and openat, and neither module
>> depends on xmalloc. I think this is a dependency bug, and that
>> my proposed patch fixes it by removing the need for the dependency.
>
> Hmm, it's an indirect dependency, but it's definitely being pulled in:
>
> $ ./gnulib-tool --with-tests --test openat
> Module list with included dependencies (indented):
...
> xgetcwd
>
> I'll try looking deeper to see where the real culprit lies, and if we
> can break the rest of this module chain from dragging in xalloc.
save-cwd uses xgetcwd, which calls xalloc_die.
/* Return the current directory, newly allocated.
Upon an out-of-memory error, call xalloc_die.
Upon any other type of error, return NULL. */
char *
xgetcwd (void)
{
char *cwd = getcwd (NULL, 0);
if (! cwd && errno == ENOMEM)
xalloc_die ();
return cwd;
}
- Re: Openat without die, (continued)
- Re: Openat without die, Jim Meyering, 2011/01/11
- Re: Openat without die, Eric Blake, 2011/01/11
- Re: Openat without die, Bastien ROUCARIES, 2011/01/11
- Re: Openat without die, Paul Eggert, 2011/01/11
- Re: Openat without die, Eric Blake, 2011/01/11
- Re: Openat without die, Paul Eggert, 2011/01/11
- Re: Openat without die, Eric Blake, 2011/01/11
- Re: Openat without die, Eric Blake, 2011/01/11
- Re: Openat without die, Paul Eggert, 2011/01/11
- Re: Openat without die, Eric Blake, 2011/01/11
- Re: Openat without die,
Jim Meyering <=
- Re: Openat without die, Paul Eggert, 2011/01/11
- Re: Openat without die, Jim Meyering, 2011/01/11
- Re: Openat without die, Paul Eggert, 2011/01/11
- Re: Openat without die, Jim Meyering, 2011/01/11
- Re: Openat without die, Jim Meyering, 2011/01/11
- Message not available
- ChangeLog fix for openat-die fix, Paul Eggert, 2011/01/12
- Re: Openat without die, Bastien ROUCARIES, 2011/01/12
- Re: Openat without die, Eric Blake, 2011/01/12
- Re: Openat without die, Bruno Haible, 2011/01/11
- Re: Openat without die, Jim Meyering, 2011/01/13