www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18425] New: std.process environment["VAR"] = "NAME" does not

https://issues.dlang.org/show_bug.cgi?id=18425

          Issue ID: 18425
           Summary: std.process environment["VAR"] = "NAME" does not
                    always take effect
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: johnnymarler gmail.com

Mike Franklin had a heck of a time dealing with an apparent bug in
`std.process` where setting an environment variable in windows doesn't appear
to take effect.  By "take effect" I mean, a child process did not receive the
new value set by the parent process using `environemnt["VAR"] = "VALUE";`.

phobos uses the `SetEnvironmentVariableW` function for all windows
platforms/runtimes, however, Mike only started having success once he started
using `putenv` for `version(Win32)`.

PR for reference: https://github.com/dlang/dmd/pull/7845

--
Feb 11 2018