in common/teamcity_messages.cpp [11:26]
std::string getFlowIdFromEnvironment() {
#if (defined(WIN32) || defined(_WIN32) || defined(__WIN32)) && !defined(__CYGWIN__) && !defined(__MINGW32__)
char *flowId = NULL;
size_t sz = 0;
std::string result;
if(!_dupenv_s(&flowId, &sz,"TEAMCITY_PROCESS_FLOW_ID")) {
result = flowId != NULL ? flowId : "";
free(flowId);
}
return result;
#else
const char *flowId = getenv("TEAMCITY_PROCESS_FLOW_ID");
return flowId == NULL ? "" : flowId;
#endif
}