On Sunday 03 March 2013 14:03:24 H. Peter Anvin wrote: > 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.
he's saying that, why special case NULL if we think this scenario is invalid. a pointer of argv[0] = 1 will crash just as hard. -mike
signature.asc
Description: This is a digitally signed message part.
