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

refact: remove multi process codes

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