[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-tar] bug#15970: Crash in gettext() after fork() on Mac OS X
From: |
Pádraig Brady |
Subject: |
Re: [Bug-tar] bug#15970: Crash in gettext() after fork() on Mac OS X |
Date: |
Tue, 26 Nov 2013 12:23:15 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 |
On 11/26/2013 04:55 AM, Paul Eggert wrote:
> Pádraig Brady wrote:
>
>> How about the attached instead that just uses
>> a somewhat degraded but simpler error() equivalent.
>
> That looks safe, though it could be simplified:
> use inttostr instead of repeating its body,
Hah, I was thinking this must be done somewhere else :)
> and since !!p == !!errnum there's no need
> to have those duplicate conditions.
I meant to use (p || errstr), but let's assume
errstr is present, so yes we can then remove condition.
> Plus, just use STDERR_FILENO rather than
> fiddling with fileno (stderr),
done
> and async_safe_error
> should be _Noreturn and should unconditionally call
> _exit.
fair enough. I changed the name so to async_safe_die()
> And, I wouldn't bother looking at dup2's
> return value, any more than we look at close's.
Updated patch attached.
thanks!
Pádraig.
sort-async-safe.patch
Description: Text Data
- [Bug-tar] Crash in gettext() after fork() on Mac OS X, Guillem Jover, 2013/11/23
- Re: [Bug-tar] Crash in gettext() after fork() on Mac OS X, Eric Blake, 2013/11/23
- Re: [Bug-tar] Crash in gettext() after fork() on Mac OS X, Paul Eggert, 2013/11/24
- Re: [Bug-tar] bug#15970: Crash in gettext() after fork() on Mac OS X, Joerg Schilling, 2013/11/26
- Re: [Bug-tar] bug#15970: bug#15970: Crash in gettext() after fork() on Mac OS X, Pádraig Brady, 2013/11/26
- Re: [Bug-tar] bug#15970: bug#15970: Crash in gettext() after fork() on Mac OS X, Joerg Schilling, 2013/11/27
- [Bug-tar] ignore_value vs (void) [was: bug#15970: bug#15970: Crash in gettext() after fork() on Mac OS X], Eric Blake, 2013/11/27
- Re: [Bug-tar] ignore_value vs (void) [was: bug#15970: bug#15970: Crash in gettext() after fork() on Mac OS X], Joerg Schilling, 2013/11/27
- Re: [Bug-tar] ignore_value vs (void) [was: bug#15970: bug#15970: Crash in gettext() after fork() on Mac OS X], Eric Blake, 2013/11/27
- Re: [Bug-tar] ignore_value vs (void) [was: bug#15970: bug#15970: Crash in gettext() after fork() on Mac OS X], Joerg Schilling, 2013/11/27
- Re: [Bug-tar] ignore_value vs (void) [was: bug#15970: bug#15970: Crash in gettext() after fork() on Mac OS X], Eric Blake, 2013/11/27
- Re: [Bug-tar] ignore_value vs (void) [was: bug#15970: bug#15970: Crash in gettext() after fork() on Mac OS X], Paul Eggert, 2013/11/27
- Re: [Bug-tar] ignore_value vs (void) [was: bug#15970: bug#15970: Crash in gettext() after fork() on Mac OS X], Charles Swiger, 2013/11/27