[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:38:32 +0100 |
Paul Eggert wrote:
> On 01/11/11 12:16, Jim Meyering wrote:
>> save-cwd uses xgetcwd, which calls xalloc_die.
>
> Thanks for tracking that down. How about this revised patch
> instead? It also fixes the ChangeLog along the lines of your
> previous email.
>
>>From 47ea09cc55b49fa027b7f66e15cb5e70e7119ee6 Mon Sep 17 00:00:00 2001
> From: Paul Eggert <address@hidden>
> Date: Tue, 11 Jan 2011 10:42:55 -0800
> Subject: [PATCH] openat, save-cwd: avoid xmalloc
>
> This removes an direct (but undocumented) dependency of openat on
nit: s/an/a/
That looks fine. Thanks!
> xalloc, along with an indirect dependency via save-cwd. It also
> removes a dependency of save-cwd on xgetcwd (and thereby
> indirectly) on xalloc. This change causes the openat substitute
> to fall back on save_cwd when memory is tight, and for save_cwd to
> fail instead of dying when memory is tight, but that's good enough.
>
> * lib/openat-proc.c: Include stdlib.h (for malloc), not
> xalloc.h (for xmalloc).
> (openat_proc_name): Check for malloc failure.
> * lib/save-cwd.c (save_cwd): Use getcwd, not xgetcwd.
> * modules/save-cwd (Files): Remove xgetcwd.
- Re: Openat without die, (continued)
- 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, 2011/01/11
- Re: Openat without die, Paul Eggert, 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, 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
Re: Openat without die, Jim Meyering, 2011/01/11