提交 79f16a6d 编写于 作者: S Shengliang Guan

refact: remove multi process codes

上级 0e30d177
......@@ -60,6 +60,7 @@ bool osTempSpaceSufficient();
void osSetTimezone(const char *timezone);
void osSetSystemLocale(const char *inLocale, const char *inCharSet);
void osSetProcPath(int32_t argc, char **argv);
#ifdef __cplusplus
}
......
......@@ -1196,6 +1196,7 @@ int32_t taosInitCfg(const char *cfgDir, const char **envCmd, const char *envFile
if (cfgLoadFromArray(tsCfg, pArgs) != 0) {
uError("failed to load cfg from array since %s", terrstr());
cfgCleanup(tsCfg);
tsCfg = NULL;
return -1;
}
......
......@@ -208,6 +208,7 @@ int mainWindows(int argc, char **argv) {
taosCleanupCfg();
taosCloseLog();
taosCleanupArgs();
taosConvDestroy();
return 0;
}
......@@ -216,9 +217,11 @@ int mainWindows(int argc, char **argv) {
taosCleanupCfg();
taosCloseLog();
taosCleanupArgs();
taosConvDestroy();
return 0;
}
osSetProcPath(argc, (char **)argv);
taosCleanupArgs();
if (dmInit() != 0) {
......
......@@ -132,8 +132,8 @@ void dmCleanup() {
taosStopCacheRefreshWorker();
dInfo("dnode env is cleaned up");
taosCloseLog();
taosCleanupCfg();
taosCloseLog();
}
void dmStop() {
......
......@@ -105,3 +105,5 @@ void osSetSystemLocale(const char *inLocale, const char *inCharSet) {
memcpy(tsLocale, inLocale, strlen(inLocale) + 1);
memcpy(tsCharset, inCharSet, strlen(inCharSet) + 1);
}
void osSetProcPath(int32_t argc, char **argv) { tsProcPath = argv[0]; }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册