Path: utzoo!utgpu!water!watmath!clyde!rutgers!rochester!cornell!uw-beaver!mit-eddie!husc6!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.unix.questions Subject: Re: How does a program get its path name? Message-ID: <7304@brl-smoke.ARPA> Date: 21 Feb 88 11:33:50 GMT References: <11923@brl-adm.ARPA> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 12 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.