sysconf - exposing constants to userspace

From: Tim Hockin
Date: Thu Feb 19 2004 - 15:57:00 EST


What is the preferred way to expose "constants" to userland? I quoty-finger
"constants" because they may be defined as constants to any given kernel,
they are not necessarily constant over time.

There are things which can be changed as constants which would currently
require a libc recompile. For example NGROUPS_MAX :). Since it just got
merged, anyone who wants to use it will have to recompile their libc to get
the new value of NGROUPS_MAX.

I found an old old patch to do this via read-only sysctl() entries. Should
I resurrect that patch? Or maybe just do a sys_sysconf() entry? Or should
I just shut up and tell users to cope with recompiling libc?

--
Tim Hockin
Sun Microsystems, Linux Software Engineering
thockin@xxxxxxx
All opinions are my own, not Sun's
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/