[Pkg-shadow-devel] Bug#265613: What is the purpose of HZ in login.defs?
Nicolas François
nicolas.francois@centraliens.net
Thu, 9 Jun 2005 00:36:45 +0200
On Tue, Jun 07, 2005 at 08:25:02AM +0200, Christian Perrier wrote:
> > Let's ask about HZ on #debian -- maybe there's somebody
> > old enough to remember and not too old to lost all
> > his memories :) about what was this envvar used for in
> > archaic times...
>
>
> Can you summarize tous discussion of last night on IRC here?
>
> We need to decide which comment is to be put in /etc/login.defs to
> deal with this bug report.
The short summary is "We don't know what this environment variable is used
for, and why it is set by su/login/sulogin".
Here is a longer summary:
A Google search indicate that this environment is quite common (mentionned
in SunOS documentation, many programs use getenv("HZ"), ...)
>From the login source:
* Add the clock frequency so that profiling commands work
* correctly.
We did not found what profiling tool it may be, but it may be prof or
times:
http://osr507doc.sco.com/en/man/html.M/environ.M.html
What is surprising is that such tool rely on an environment variable,
which could be changed by an user, while it is a "description" of the
system. An explanation for this could be that it comes from before POSIX,
which defines sysconf(_SC_CLK_TCK).
sysconf(_SC_CLK_TCK) is now used by prof or times according to the SCO
documentation.
The other surprising point is that this environment variable is set by
login, and not by a shell initialization file.
Since then, I've checked on Google groups (env_hz -debian) or (hz -debian
environment variables)
It seems there were some consequences on ftape, Pcomm or u386mon
Also, ps and top use this environment variable as a fall-back.
The next step may be to ask a dinausor on
comp.unix.{admin,programmer,questions,shell}
If it was just up to me, I would just drop it, and fix the applications
that use this environment variable (change them to sysconf(_SC_CLK_TCK)),
or let the users/admins in their .profile
(Note the messages on Google groups which indicate consequences are 10
years old)
PS: I've just seen that Alexander sent another summary, but as this one is
ready, I'm sending it.
Kind Regards,
--
Nekral