refact: remove multi process codes
This commit is contained in:
parent
0e30d177fa
commit
79f16a6d54
|
@ -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
|
||||||
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) {
|
||||||
taosCleanupCfg();
|
taosCleanupCfg();
|
||||||
taosCloseLog();
|
taosCloseLog();
|
||||||
taosCleanupArgs();
|
taosCleanupArgs();
|
||||||
|
taosConvDestroy();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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() {
|
||||||
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) {
|
||||||
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]; }
|
||||||
|
|
Loading…
Reference in New Issue