|
From: | Paul Eggert |
Subject: | Re: behavioral change in coreutils `pwd` handling '//' (double slash) caused by gnulib update |
Date: | Mon, 6 Jan 2025 18:27:17 -0800 |
User-agent: | Mozilla Thunderbird |
On 2025-01-06 15:44, Kaz Kylheku wrote:
But, here is a question; if you're going to rely on /proc/self in implementing getcwd, why not just read the /proc/self/cwd symlink?
Haven't a clue. Also, I don't know why on Linux the Gnulib code doesn't use the getcwd syscall; this should be better than /proc/self/cwd because the syscall doesn't rely on /proc being mounted.
In the first place, why does glib provide POSIX functions on platforms where the POSIX C library is under the control of the free software movement?
I assume you mean Gnulib rather than glib? If so, the answer is partly that Gnulib development can move faster than the underlying C library in many cases; and in the cases where the underyling C library suffices Gnulib indeed is supposed to stay out of the way (i.e., it does not define REPLACE_GETCWD) and therefore Gnulib-using apps do call the underlying C getcwd directly.
[Prev in Thread] | Current Thread | [Next in Thread] |