MCPcopy Create free account
hub / github.com/chen3feng/toft / GetAllEnvironments

Function GetAllEnvironments

system/process/sub_process.cpp:154–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152}
153
154static void GetAllEnvironments(std::map<std::string, std::string>* envs)
155{
156 envs->clear();
157 int i = 0;
158 while (environ[i]) {
159 char* env = environ[i];
160 char* p = strchr(env, '=');
161 if (p) {
162 (*envs)[std::string(env, p)] = p + 1;
163 }
164 ++i;
165 }
166}
167
168static void AppendEnvironments(std::map<std::string, std::string>* envs,
169 const std::map<std::string, std::string>& append,

Callers 1

DoExecMethod · 0.85

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected