Re: [PATCH] Undeprecate the sysctl system call

Andi Kleen
2006-10-18T12:46:39Z

On Wednesday 18 October 2006 14:15, Alan Cox wrote:

> > Anyways, imho the right solution is to remove the numerical
> > sysctl infrastructure (including most of sysctl.h), but keep
> > sys_sysctl() with a small mapping table that maps the few
> > numerical sysctls (mostly KERN_VERSION) that are actually used to
> > path names internally. The rest should be ENOSYS.
>
> More work for less compatibility, that doesn't sound very clever.

It's less work long term, mostly because all the rejects for sysctl.h will
go away. And it's more compatible than just removing sysctl(2) completely.

The main reason i think at least emulating KERN_VERSION is a good idea is that
it will save a bit of time with older executables who do this
on every startup. /proc/sys/* is a little slow to do that often.

Normally sysctls are not that time critical so this is really a
exception.

-Andi