Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wasatch!cs.utexas.edu!uunet!bfmny0!tneff From: tneff@bfmny0.UUCP (Tom Neff) Newsgroups: comp.lang.c Subject: Re: Contents of argv[0] Message-ID: <14573@bfmny0.UUCP> Date: 21 Aug 89 14:45:43 GMT References: <9002@attctc.Dallas.TX.US> <1017@virtech.UUCP> <10094@csli.Stanford.EDU> <1935@ifi.uio.no> <1989Aug20.023248.28923@utzoo.uucp> <10154@csli.Stanford.EDU> Reply-To: tneff@bfmny0.UU.NET (Tom Neff) Organization: ^ Lines: 16 As far as the C language itself goes, this discussion is completely meaningless. It's ludicrously parochial to insist that argv[0] hold a "PATHNAME," whatever in the world that may be. In the universe of possible C implementations, you don't even necessarily associate one program with one "FILE," or even have such a thing as "FILE." All that argv[0] gives you is a "handle" by which you can refer to the program. For error messages and such, that's all you need. Attempting to be precious by "extracting" the "name" portion only for use in error messages is a non portable operation. To the extent that UNIX-oid type people have a legitimate interest in being able to parse argv[0] pathwise, the issue should be addressed by POSIX and discussed in comp.sys.whatever. -- "We walked on the moon -- (( Tom Neff you be polite" )) tneff@bfmny0.UU.NET