This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 1/2] Deprecate sysctl syscall interface
On Mon, Apr 30, 2018 at 7:09 AM, Adhemerval Zanella
<adhemerval.zanella@linaro.org> wrote:
>
> * The obsolete function sysctl is no longer available to newly linkerd binaries;
> the header <sys/sysctl.h> has been removed. This function has been deprecated
> since Linux 2.6.24 in favor of /proc/sys.
I've been thinking about this since you posted the original patch, and
I don't think this is the right treatment of this specific function.
sysctl still exists and is the preferred interface on the BSDs and I
think also Solaris. Linux may not support it at the kernel level but
we should leave open the possibility of a future user-space shim, or
of the kernel people changing their minds (frankly, I have never found
the argument for /proc/sys instead of sysctl at all convincing). That
means:
- Do still install a generic <sys/sysctl.h> that prototypes sysctl()
and includes bits/sysctl.h but does nothing else.
- Do still install a generic <bits/sysctl.h> that declares nothing.
- Drop sysdeps/u/s/l/sysctl.c as in this patch, but move
sysdeps/u/s/l/generic/sysctl.c to misc/, and *don't* make it a compat
symbol.
zw