Don't pass environment variables with "\n" to LightProcesses

A recent diff started (correctly) passing the environment
through to child processes. It turns out our LightProcess implementation
can't handle environment variables with new lines in them, so (for now)
strip out any such variables.
Esse commit está contido em:
mwilliams
2013-06-19 09:33:31 -07:00
commit de Sara Golemon
commit 6342bdbf1b
+4 -1
Ver Arquivo
@@ -814,7 +814,10 @@ Variant f_proc_open(CStrRef cmd, CArrRef descriptorspec, VRefParam pipes,
nvpair += iter.first().toString();
nvpair += '=';
nvpair += iter.second().toString();
envs.push_back(nvpair.detach().c_str());
string tmp = nvpair.detach().c_str();
if (tmp.find('\n') == string::npos) {
envs.push_back(tmp);
}
}
child = LightProcess::proc_open(cmd.c_str(), created, intended,