[plt-scheme] set environment variables in subprocess

From: Eli Barzilay (eli at barzilay.org)
Date: Wed Jan 13 22:36:52 EST 2010

On Jan 13, YC wrote:
> On Wed, Jan 13, 2010 at 6:49 PM, Eli Barzilay <eli at barzilay.org> wrote:
> 
> > It seems that this makes it easy to reflect the environment as
> > something like a parameter that holds an immutable hash table,
> > then re-route all `getenv'/`putenv' through to it, and make
> > `subprocess' translate the hash back into whatever the system call
> > expects, caching the result based on the hash identity.
> 
> That would be cool.  An additional implication of this approach is
> that we then can iterate through the environment variables, unlike
> getenv today, which requires knowing the keys in advance.

Yes, there's a number of things that are missing now: removing a
variable, find all of them, taking a convenient snapshot of all, and
using some parameterize-like construct to change them for a local
dynamic extent.  All of these are free with the above...

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!


Posted on the users mailing list.