Path: utzoo!mnetor!uunet!husc6!hao!ames!pasteur!agate!web6b.berkeley.edu!shipley From: shipley@web6b.berkeley.edu (Peter Shipley) Newsgroups: comp.unix.questions Subject: Re: How does a program get its path name? Message-ID: <7102@agate.BERKELEY.EDU> Date: 21 Feb 88 14:46:08 GMT References: <11923@brl-adm.ARPA> <7304@brl-smoke.ARPA> Sender: usenet@agate.BERKELEY.EDU Reply-To: shipley@widow.berkeley.edu (Peter Shipley) Organization: University of California, Berkeley Lines: 32 In article <7304@brl-smoke.ARPA> gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) writes: >In article <11923@brl-adm.ARPA> Leisner.Henr@xerox.com (marty) writes: >>How does an exec program get the pathname it was execed from if it wants to find >>out this information? > >That information is not generally available to the process. > >>(I'm specifically asking how cc knows to looks at ../lib for the compiler >>passes). > >I don't know of any "cc"s that work like that. Usually the pathnames >of the slave programs are hard-wired into the "cc" code, although >they're sometimes configurable via the makefile for cc when it's built. I thought that the path came from the user's environment variable PATH. F I L L E R Pete Shipley: email: shipley@violet.berkeley.edu Flames: cc-29@cory.berkeley.edu ucbvax!violet!shipley ucbvax!cory!cc-29 Spelling corections: /dev/null Quote: "Anger is an energy"