Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 May 2002 20:35:19 +0000
From:      "J. Mallett" <jmallett@FreeBSD.ORG>
To:        Terry Lambert <tlambert2@mindspring.com>
Cc:        Bernd Walter <ticso@cicely5.cicely.de>, "J. Mallett" <jmallett@FreeBSD.ORG>, freebsd-current@FreeBSD.ORG
Subject:   Re: make(1) patch to ReadMakefile() to use realpath(3)
Message-ID:  <20020519203519.GA32010@FreeBSD.ORG>
In-Reply-To: <3CE8095D.CFFF57F7@mindspring.com>
References:  <20020519100420.GA8356@FreeBSD.ORG> <20020519132159.GI44753@cicely5.cicely.de> <3CE8095D.CFFF57F7@mindspring.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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
loaning.

> 8-).
> 
> 
> > 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.
-- 
jmallett@FreeBSD.org   | 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 majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020519203519.GA32010>