Path: utzoo!utgpu!water!watmath!clyde!rutgers!uwvax!oddjob!hao!ames!nrl-cmf!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: <7310@brl-smoke.ARPA> Date: 22 Feb 88 03:20:45 GMT References: <11923@brl-adm.ARPA> <7304@brl-smoke.ARPA> <7102@agate.BERKELEY.EDU> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 16 In article <7102@agate.BERKELEY.EDU> shipley@widow.berkeley.edu (Peter Shipley) writes: >In article <7304@brl-smoke.ARPA> gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) writes: >>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. Oh no -- that would obviously be a disaster. PATH is used to locate command executable files when no "/" is present in their names as specified to the shell (or exec*p() function). This determines, for instance, whether you will execute /bin/cc or /usr/5bin/cc on a dual- environment Berkeley-based system such as SunOS 3.2, when you specify just "cc". However, each of the "cc" executables knows where to find its own subprocess executable files (in this example, both may use /lib/c0 etc.).