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 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]; }
|
||||
|
|
Loading…
Reference in New Issue