Environment variables in Windows 2000

Mats Wichmann mats at laplaza.org
Mon Nov 26 23:02:33 CET 2001


On Sun, 25 Nov 2001 15:55:32 -0800, Tim Roberts <timr at probo.com>
wrote:

:Tim Daneliuk <tundra at tundraware.com> wrote:
:>
:>This is not a problem,  but an intentional design point in both operating
:>systems.  You do not want a random user process to be able to fiddle with
:>the runtime environments of other users.  This is intentionally possible
:>only by an act of system administration...
:>
:>It is a bit unclear exactly what the original poster was trying to
:>accomplish, ...
:
:I thought his goal was clear, and actually quite reasonable: he'd like to
:modify the environment of his processes parent, so that succeeding
:processes inherit his changes.  He's not trying to change another user's
:environment, he's just trying to use the environment to pass data from one
:program to another in the same session.
:
:It is a common goal, although unachievable without a certain amount of
:magic.

Depends on how you define magic.

If you want this to happen, the child needs to tell the parent to
modify its' environment.  It can't do so directly.  Using some
upstream communication mechanism can accomplish this, whether that is
to put stuff in a file, use a pipe, socket, shared memory segment, or
other.  Environment variables are purely downstream, if you want to
think of them that way: I like to present them as a way to avoid
invoking a program with a few hundred bytes worth of command-line
options


Mats Wichmann




More information about the Python-list mailing list