Propagate environment variables to spaned fdbserver process

This commit is contained in:
Dan Lambright 2022-08-06 10:50:05 -07:00
parent 4a25f8b692
commit f9866f419a
2 changed files with 12 additions and 1 deletions

View File

@ -19,6 +19,7 @@
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@ -487,6 +488,16 @@ namespace SummarizeTest
useValgrind ? "on" : "off");
}
IDictionary data = Environment.GetEnvironmentVariables();
foreach (DictionaryEntry i in data)
{
string k=(string)i.Key;
string v=(string)i.Value;
if (k.StartsWith("FDB_KNOB")) {
process.StartInfo.EnvironmentVariables[k]=v;
}
}
process.Start();
// SOMEDAY: Do we want to actually do anything with standard output or error?

View File

@ -282,7 +282,7 @@ void getLocalTime(const time_t* timep, struct tm* result);
// get GMT time string from an epoch seconds double
std::string epochsToGMTString(double epochs);
#define ENVIRONMENT_KNOB_OPTION_PREFIX "JOSHUA_FDB_KNOB_"
#define ENVIRONMENT_KNOB_OPTION_PREFIX "FDB_KNOB_"
// returns list of environment variables with prefix ENVIRONMENT_KNOB_OPTION_PREFIX
std::vector<std::string> getEnvironmentKnobOptions();