On Sun, May 19, 2002 at 01:21:49PM -0700, Terry Lambert wrote:
> Bernd Walter wrote:
> > Why do people think that a realpath is always available?
> Because it would be really convenient if we could program without
> having to remember on line 17 what we did on line 3, because we
> have really, really short attention spans.
No Terry, not quite the same thing.
> While we are at it, wouldn't it be nice if all locks just
> disappeared when we closed files, and all open files and
> memory allocations went away when our programs exitted?
No, because then we'd get lazy programming style overall and expect const
qualifiers to implicitly cast away in function arguments, etc.
In fact, neither of those are particularly interesting or useful.
Now, wouldn't it be nice if we had zero-copy one-to-many pipe file descriptor
> > What is wrong with just extending using pwd?
> > And maybe optionally stripping .. and . elements if wanted.
> > At least pwd doesn't break amd(8) pathnames.
> > It became nearly impossible to use amd(8) today just because of all that
> > realpath introduced breakage.
> That's annoying.
> I guess it's because people would really like it to work, even though
> hard links make it completely impossible, unless you change a number
> of things in the kernel in some pretty serious ways. 8-(.
That's right. Long story short there's no libc or kernel facility to do
it, and there's no way to pull a canonical path out of a hat given "." or
getcwd(), unless any canonical path will do.
[EMAIL PROTECTED] | C, MIPS, POSIX, UNIX, BSD, IRC Geek.
http://www.FreeBSD.org | The Power to Serve
Vote for me for FreeBSD core or the cute little bunny gets it.
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message