lkml.org 
[lkml]   [2005]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: Environment variables inside the kernel?
    From
    Date
    Guillermo López Alejos <glalejos@gmail.com> writes:

    > Hi,
    >
    > I have a piece of code which uses environment variables. I have been
    > told that it is not going to work in kernel space because the concept
    > of environment is not applicable inside the kernel.

    Correct.

    > I belive that, but I need to demonstrate it. I do not know how to
    > proof this, perhaps referring to a solid reference about Linux design
    > that points to the idea that it has no sense to use environment
    > variables in kernel space.

    Environment variables are a part of the API that Unix supplies to
    userspace programs. The kernel is not a userspace program, and as far
    as I know it doesn't even do most of the work of maintaining the
    environment for a process--that's done by the C library and the
    userspace program loader.

    > Do anyone knows about the existence of such document?

    No, probably because it's such an obvious concept. You might get hold
    of one of the several books on Linux kernel programming and see if
    they mention it.

    If someone is insisting you use environment varaiables in kernel code,
    challenge them to show you where they are implemented in the kernel. :)

    -Doug
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-08-18 18:40    [W:2.631 / U:1.324 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site