Re: sysconf - exposing constants to userspace

From: Jeff Sipek
Date: Thu Feb 19 2004 - 16:35:28 EST


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday 19 February 2004 15:48, Tim Hockin wrote:
> 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?

I think that making something in /sys would make the most sense, with one
constant per file. We could dump the consts files to for example /sys/consts,
or make a logical directory structure to make navigation easier.

Jeff.

- --
UNIX is user-friendly ... it's just selective about who it's friends are
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFANSsEwFP0+seVj/4RAgiaAJ9ka5sUjXEE+xNazblPO73/ovnsrACgpZPX
kGZV3gEplJpx24eL62AuQqA=
=3HMU
-----END PGP SIGNATURE-----

-
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/