提交 d044a4ee 编写于 作者: S slzhou

fix bug that udfd can not be spawned

上级 d4734eb1
...@@ -233,10 +233,7 @@ static int32_t dmSpawnUdfd(SDnodeData *pData) { ...@@ -233,10 +233,7 @@ static int32_t dmSpawnUdfd(SDnodeData *pData) {
dInfo("dnode start spawning udfd"); dInfo("dnode start spawning udfd");
uv_process_options_t options = {0}; uv_process_options_t options = {0};
char path[PATH_MAX] = {0}; char path[] = "udfd";
size_t cwdSize;
uv_cwd(path, &cwdSize);
strcat(path, "/udfd");
char* argsUdfd[] = {path, "-c", configDir, NULL}; char* argsUdfd[] = {path, "-c", configDir, NULL};
options.args = argsUdfd; options.args = argsUdfd;
options.file = path; options.file = path;
...@@ -295,6 +292,9 @@ int32_t dmStartUdfd(SDnode *pDnode) { ...@@ -295,6 +292,9 @@ int32_t dmStartUdfd(SDnode *pDnode) {
int32_t dmStopUdfd(SDnode *pDnode) { int32_t dmStopUdfd(SDnode *pDnode) {
SDnodeData *pData = &pDnode->data; SDnodeData *pData = &pDnode->data;
if (pData->udfdErrCode != 0) {
return 0;
}
atomic_store_8(&pData->udfdStoping, 1); atomic_store_8(&pData->udfdStoping, 1);
uv_barrier_destroy(&pData->udfdBarrier); uv_barrier_destroy(&pData->udfdBarrier);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册