How does a program get its path name?
Doug Gwyn
gwyn at brl-smoke.ARPA
Mon Feb 22 13:20:45 AEST 1988
In article <7102 at agate.BERKELEY.EDU> shipley at widow.berkeley.edu (Peter Shipley) writes:
>In article <7304 at brl-smoke.ARPA> gwyn at brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>) 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.).
More information about the Comp.unix.questions
mailing list