[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: That '[' file in /usr/bin
From: |
H. Peter Anvin |
Subject: |
Re: That '[' file in /usr/bin |
Date: |
Sun, 03 Mar 2013 11:03:24 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130219 Thunderbird/17.0.3 |
On 03/03/2013 02:53 AM, Pádraig Brady wrote:
>>
>> personally, i find it a bit ironic that a lot of GNU apps (including
>> coreutils)
>> simply abort() themselves when argv[0]==NULL considering the project's hard
>> line position about not relying on argv[0] for behavior.
>
> This issue was mentioned here:
> http://lists.gnu.org/archive/html/bug-coreutils/2009-11/msg00215.html
>
> The problem with avoiding the aborts is that NULL is only
> one of many invalid values for argv[0]
>
Come again?
You can't seriously say that checking for a null pointer or an invalid
string (for whatever definition of "valid" you happen to have) is hard.
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.