Newsgroups: comp.lang.c
Path: utzoo!henry
From: henry@utzoo.uucp (Henry Spencer)
Subject: Re: Contents of argv[0]
Message-ID: <1989Aug20.023248.28923@utzoo.uucp>
Organization: U of Toronto Zoology
References: <9002@attctc.Dallas.TX.US> <1017@virtech.UUCP> <10094@csli.Stanford.EDU> <1935@ifi.uio.no>
Date: Sun, 20 Aug 89 02:32:48 GMT

In article <1935@ifi.uio.no> gisle@ifi.uio.no (Gisle Hannemyr) writes:
>> This effectively means that in general, argv[0] cannot
>> be treated as a reliable source for the path name! [RTFM]
>
>Is there anything that can be relied upon for this?

No.

>I want to know which directory the executable file resided in.

In current systems you simply don't know.
-- 
V7 /bin/mail source: 554 lines.|     Henry Spencer at U of Toronto Zoology
1989 X.400 specs: 2200+ pages. | uunet!attcan!utzoo!henry henry@zoo.toronto.edu