Xref: utzoo comp.unix.wizards:8495 comp.sources.d:2114 Path: utzoo!yunexus!geac!daveb From: daveb@geac.UUCP (David Collier-Brown) Newsgroups: comp.unix.wizards,comp.sources.d Subject: Re: Finding where an executable was run from -- a proposal. Summary: there is a "name" program... Message-ID: <2752@geac.UUCP> Date: 16 May 88 15:41:07 GMT Article-I.D.: geac.2752 Posted: Mon May 16 11:41:07 1988 References: <67@uvaarpa.virginia.edu> <6800012@cpe> <4527@hoptoad.uucp> <9987@tekecs.TEK.COM> <5307@bloom-beacon.MIT.EDU> Reply-To: daveb@geac.UUCP (David Collier-Brown) Organization: /usr/lib/news/organisation Lines: 23 In article <5307@bloom-beacon.MIT.EDU> wesommer@athena.mit.edu (William Sommerfeld) writes: | I remarked (in private mail) to John Gilmore that what he described | was very similar to the Multics referencing_dir mechanism. If it's | done right, the application gets passed its _real_ absolute pathname, | after all the symlinks have been chased. | | While I'm here, I might as well lobby for support for a library | function/system call which canonicalizes a pathname, chasing all the | links and turning it into an absolute pathname. abs_path(".", buf) should | be equivalent to getwd(buf). It was useful on Multics. It would be | very useful in some cases on UNIX. |... | Bill Sommerfeld | wesommer@athena.mit.edu I have a copy of a program called "name" which appears to do just that (the O(n**2) variant), whose origin is unknown. Would the author care to (re)post it? Shall I? -- David Collier-Brown. {mnetor yunexus utgpu}!geac!daveb Geac Computers Ltd., | "His Majesty made you a major 350 Steelcase Road, | because he believed you would Markham, Ontario. | know when not to obey his orders"