Re: Environment variables inside the kernel?

From: Emilio JesÃs Gallego Arias
Date: Thu Aug 18 2005 - 15:02:10 EST


Guillermo LÃpez Alejos <glalejos@xxxxxxxxx> writes:

> Whoa!, I did not expect so many replies. Thank you for your answers.
>
> The thing is that the Computer Architecture area of the University I
> am studying at is developing a parallel filesystem. Currently it works
> as a stand-alone program (this is why it uses resources like
> environment variables), and I have been told to integrate it in the
> Linux kernel.
>
> I have to justify changes on this filesystem code (like avoiding the
> use of environment variables) to my tutor. In this case I needed to
> find why it is not possible to use environment variables in kernel
> space.
>
> I was looking for a reference documentation which give a definition of
> environment variables that exclude their use inside the kernel, or,
> simply, I expected to find a design decision to justify this. But I
> think I have enough information with your answers, I will be able to
> elaborate a satisfactory conclusion.

A good reference is in Debian Policy Section 9.9, where it is stated:

A program must not depend on environment variables to get reasonable
defaults. (That's because these environment variables would have to be
set in a system-wide configuration file like /etc/profile, which is
not supported by all shells.)

Although this is not applicable to the kernel, goggling about this
section of the Debian Policy will give you some arguments against
environment variables in general.


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