[haiku-development] Re: BSD vs. POSIX realpath()

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 15 Jul 2009 14:02:15 +0200 CEST

Ingo Weinhold <ingo_weinhold@xxxxxx> wrote:
> On 2009-07-15 at 11:41:11 [+0200], Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
> > wrote:
> > I recently noticed that our realpath() did not comply to the POSIX
> > standard, and fixed that.
> > However, the BSD version of realpath() does not fail if only the
> > last
> > path component is not accessible. While it's very simple to check
> > if
> > the file really exists (just an additional [l]stat()), the other
> > check
> > (if at least the parent exists) is at least slightly more
> > involved).
> >
> > The question is, should we follow BSD style, or POSIX here?
> In doubt I'd go with POSIX.

I've ported our (BSD originating) "ftp" in r31583 just to see what kind
of hassle the POSIX semantics require in this not so uncommon case (our
BPath normalization, for example, follows the BSD realpath()
semantics).

Bye,
   Axel.


Other related posts: