How does a program get its path name?

Peter Shipley shipley at web6b.berkeley.edu
Mon Feb 22 00:46:08 AEST 1988


In article <7304 at brl-smoke.ARPA> gwyn at brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>) writes:
>In article <11923 at brl-adm.ARPA> Leisner.Henr at 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 at violet.berkeley.edu     Flames:  cc-29 at cory.berkeley.edu 
         ucbvax!violet!shipley                    ucbvax!cory!cc-29
Spelling corections: /dev/null                    Quote: "Anger is an energy"



More information about the Comp.unix.questions mailing list