Re: execve

david (david@kalifornia.com)
Tue, 28 Jul 1998 12:58:39 -0700


>> This was usefull once upon the time (in the a.out days, argc==0 told the
>> dynamic linker to do the ldd things). Apart from that neither ANSI C nor
>> POSIX forbid argc == 0, thus it's a bug in the applications (they
>> shouldn't be dereferencing argv[0] if it's NULL). So it's not a kernel
>> problem.
> many programs depend on argv[0] to see what they were called as.

if the program crashes because it's attempting to dereference NULL, it's
broke. it doesn't matter if it is argv[0] or *pointerXYZ.

this is a userland problem, not a kernel issue.

the parent application should provide argv[0] if the child expects it.

-d

-- 
Look, look, see Windows 98.  Buy, lemmings, buy!   
(c) 1998 David Ford.  Redistribution via the Microsoft Network is prohibited.

Caution: all email sent to this domain is automatically added to mine and a growing network of blacklist using providers. don't spam me! instead, reverse this and email me [com dot kalifornia at david] (local users enjoy automatic rewrites)

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html