This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Merging some linux/generic code into linux?
- From: Florian Weimer <fw at deneb dot enyo dot de>
- To: libc-alpha at sourceware dot org
- Date: Thu, 31 Dec 2015 16:41:29 +0100
- Subject: Re: Merging some linux/generic code into linux?
- Authentication-results: sourceware.org; auth=none
- References: <20151230234608 dot GA3839 at aurel32 dot net>
* Aurelien Jarno:
> Now that the GNU libc requires at least a 2.6.32 kernel, the *at
> syscalls are always available. This might gives the opportunity to
> cleanup a bit the sysdeps/univ/sysv/linux/generic directory. In some
> cases like dl-origin.c, the code is almost duplicated, differing only
> by the syscall and its arguments. In some other cases like chown or
> rename we have an entry in syscalls.list on one side, and a C file on
> the other.
I'm very much in favor of unifying things as far as possible. :)
Although I find the dl-origin.c case rather puzzling. Arent
readlinkat with AT_FDCWD and readlink should be equivalent. Why was
this discrepancy introduced?
(Curiously, /proc/self/exe can refer to a file whose full path is
longer than PATH_MAX, in which case readlink fails with ENAMETOOLONG.
It would be nice to have /proc/self/origin for the directory which
contains /proc/self/exe.)
Florian