Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!think!ames!oliveb!sun!terra!brent From: brent%terra@Sun.COM (Brent Callaghan) Newsgroups: comp.unix.wizards Subject: Re: Finding where an executable was run from -- a proposal. Summary: another vnode in u-area ? Message-ID: <53285@sun.uucp> Date: 15 May 88 04:01:13 GMT References: <67@uvaarpa.virginia.edu> <6800012@cpe> <4527@hoptoad.uucp> <4687@watdcsu.waterloo.edu> Sender: news@sun.uucp Lines: 22 I think the most useful and "right" way to do this would be to add another inode/vnode to the process u-area. At the moment Unix requires two: one for the current root (changeable with chroot()) and one for the current working directory (changeable with chdir()). The extra inode would represent the directory that the process was exec-ed from. The kernel namei() could do lookups relative to this inode just like it can now for root "/" and cwd "./". The only sticky issue would be in deciding what special filename character should be used for this. Something like "@" used as a component on it's own at the beginning of a path would be OK with me. e.g. open("@/default.rc", O_RDONLY) Any takers ? Made in New Zealand --> Brent Callaghan @ Sun Microsystems uucp: sun!bcallaghan phone: (415) 691 6188