bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug #24949] coreutils pwd not implementing latest POSIX features


From: Matthew Woehlke
Subject: Re: [bug #24949] coreutils pwd not implementing latest POSIX features
Date: Fri, 05 Dec 2008 20:29:28 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.18) Gecko/20081119 Fedora/2.0.0.18-1.fc10 Thunderbird/2.0.0.18 Mnenhy/0.7.5.0

Paul D. Smith wrote:
On the other hand, I think it would not actually be that difficult to
implement -L.  It seems to me that Eric Blake's description of what it would
take to adhere to the POSIX standard, as he describes here:
http://lists.gnu.org/archive/html/bug-coreutils/2008-10/msg00258.html is more
complicated than necessary.  We do not need to strip "." or ".." from the
value of $PWD.  All we need to do is determine if the value of $PWD is (a) an
absolute path, and (b) it refers to the current directory, and (c) it does not
contain "." or ".." as filename elements.  Of these the only tricky bit AFAICS
is (b); we would need to do something like compare the device/inode values of
the directory pointed to by $PWD and the current directory to be sure they had
the same value.  I'm not sure if glib provides this type of functionality.

It's entirely possible I'm missing something obvious, but what's wrong with comparing 'readlink -f $PWD' to 'command pwd'? (Obviously I mean the effects thereof, but the point is, isn't what you say might be "hard" already addressed by readlink?)

--
Matthew
Please do not quote my e-mail address unobfuscated in message bodies.
--
For great justice!! -- Captain (Zero Wing)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]