[plt-scheme] set environment variables in subprocess

From: Eli Barzilay (eli at barzilay.org)
Date: Wed Jan 13 21:49:08 EST 2010

On Jan 13, Matthew Flatt wrote:
> At the OS level, execve() or CreateProcess() lets you provide
> environment variables for the new process, instead of just using the
> current process's settings. So, we could extend `subprocess' to
> avoid `putenv' collisions, but that support is not currently
> available.

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.
-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!


Posted on the users mailing list.