Closed deanmsands3 closed 3 years ago
In the Windows sp::Popen, we have this:
// Create the child process. bSuccess = CreateProcessW(NULL, szCmdline, // command line NULL, // process security attributes NULL, // primary thread security attributes TRUE, // handles are inherited 0, // creation flags NULL, // use parent's environment NULL, // use parent's current directory &siStartInfo, // STARTUPINFOW pointer &piProcInfo); // receives PROCESS_INFORMATION
which "uses parent's environment" i.e. no custom environment variable support.
I'll work on a pull-request to get the functionality on par with *nix.
I wrote up a gist covering the basic idea of creating a child process with a modified environment. One of the speed-bumps is that Windows uses wide characters.
Thanks, @arun11299 !
In the Windows sp::Popen, we have this:
which "uses parent's environment" i.e. no custom environment variable support.
I'll work on a pull-request to get the functionality on par with *nix.