Xref: utzoo comp.unix.wizards:8575 comp.sources.d:2129 Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!husc6!uwvax!oddjob!mimsy!eneevax!umd5!uvaarpa!mer6g From: mer6g@uvaarpa.virginia.edu (Marc E. Rouleau) Newsgroups: comp.unix.wizards,comp.sources.d Subject: Re: Finding where an executable was run from -- a proposal. Message-ID: <78@uvaarpa.virginia.edu> Date: 18 May 88 12:16:58 GMT References: <52873@sun.uucp> <107@lakart.UUCP> Reply-To: mer6g@uvaarpa.Virginia.EDU (Marc E. Rouleau) Organization: University of Virginia, Charlottesville Lines: 13 In article <107@lakart.UUCP> dg@lakart.UUCP (David Goodenough) writes: > [ some examples pointing out that (in some cases) what ends up in > argv[0] can be turned into a full pathname by prepending `pwd` to it ] This technique works only if the program being executed is invoked by specifying a relative or absolute path for it. If it is found by your shell as specified by your $PATH variable, all bets are off ... The whole point of John Gilmore's proposal was to address this problem of executables being found by path-search and therefore having no invocation-time knowledge of where they reside. -- Marc Rouleau