Path: utzoo!attcan!uunet!seismo!sundc!pitstop!sun!decwrl!ucbvax!ucsfcgl!cca.ucsf.edu!root From: root@cca.ucsf.edu (Computer Center) Newsgroups: comp.sources.d Subject: Re: Finding where an executable was run from -- a proposal. Summary: Let's keep path conventions straight Message-ID: <1262@ucsfcca.ucsf.edu> Date: 12 May 88 01:21:26 GMT References: <67@uvaarpa.virginia.edu> <6800012@cpe> <4527@hoptoad.uucp> Organization: Computer Center, UCSF Lines: 24 In article <4527@hoptoad.uucp>, gnu@hoptoad.uucp (John Gilmore) writes: > If exec() would pass this value to the executed program, say as > argv[-1], then a program could reliably know its own name, and apply a > simple transformation to it to find its data files (e.g. for program > "XXXXXX/foo", its data files are found in "XXXXXX/lib/foo/whatever"). > This works for all values of XXXXXX, whether absolute or relative. > For a subsystem like uucp, you would turn e.g. XXXXXX/uucico into > XXXXXX/lib/uucp/whatever (replace program name with subsystem name). Noooooooooo! If the program is in XXXXXX/bin/foo its support should be reachable ^^^ via XXXXXX/lib/foo. Thos Thos Sumner (thos@cca.ucsf.edu) BITNET: thos@ucsfcca (The I.G.) (...ucbvax!ucsfcgl!cca.ucsf!thos) OS|2 -- an Operating System for puppets. #include