realpath returns NULL for broken symlinks

Mike Frysinger vapier at gentoo.org
Fri Feb 9 04:56:11 UTC 2007


On Thursday 08 February 2007, Erik Andersen wrote:
> On Thu Feb 08, 2007 at 08:06:40PM -0500, Mike Frysinger wrote:
> > On Thursday 08 February 2007, Luciano Miguel Ferreira Rocha wrote:
> > > <snip>
> > > Is there any reference on the spec about the definitive meaning of
> > > "component"?
> >
> > 3.169 Filename
> > A filename is sometimes referred to as a "pathname component".
> >
> > but the only real way to find a definite answer is to ask on one of the
> > mailing lists that tracks the spec ... if only i could find one ...
>
> Not that it is definitive, considering the places where uClibc
> and glibc diverge in our understanding of the standards, but from
> a quick look over glibc's stdlib/canonicalize.c it looks like it
> also returns a NULL when readlink fails.

good point ... i thought glibc did return a value and not NULL, but i just 
tested it and indeed our behavior matches that of glibc (broken symlink 
returns NULL)

so back to the drawing board ... what's the trouble with new realpath 
implementation in busybox ...
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20070208/5272cc7e/attachment-0002.pgp 


More information about the uClibc mailing list