This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Realpath & context sensitive symlinks


> Date: Thu, 27 Sep 2001 15:03:12 -0400
> From: Daniel Jacobowitz <drow@mvista.com>
> 
> On Thu, Sep 27, 2001 at 11:57:11AM -0700, Paul Eggert wrote:
> > Realpath could invoke the 'resolvepath' system call, if it is available.
> > That would be more reliable than the chdir/getcwd hack that you suggested.
> 
> I can certainly see it being more elegant, but in what way is it more
> reliable?

chdir, getcwd, and chdir back can be interrupted (which means that
your signal handler will run in the wrong directory), or can fail for
reasons unrelated to the realpath (e.g. you may not be able to chdir
back -- then what do you do?).

How about getting resolvepath into Linux?  I think you can build a
good case for it.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]