mirror of
https://github.com/ksherlock/mpw-shell.git
synced 2026-01-22 18:16:01 +00:00
transfer environment to child process
This commit is contained in:
@@ -67,7 +67,14 @@ namespace {
|
||||
|
||||
if (pid == 0) {
|
||||
|
||||
// also export environment...
|
||||
// export environment...
|
||||
|
||||
for (const auto &kv : env) {
|
||||
if (kv.second) { // exported
|
||||
std::string name = "mpw$" + kv.first;
|
||||
setenv(name.c_str(), kv.second.c_str(), 1);
|
||||
}
|
||||
}
|
||||
|
||||
// handle any indirection...
|
||||
fds.dup();
|
||||
|
||||
Reference in New Issue
Block a user