feat: set correct rsp code.

This commit is contained in:
Haojun Liao 2024-11-08 10:31:48 +08:00
parent 9c5c9f62ad
commit c312896d73
2 changed files with 6 additions and 1 deletions

View File

@ -130,6 +130,7 @@ void stopRsync() {
if (code == 0) { if (code == 0) {
int32_t ret = tsnprintf(buf, tListLen(buf), "kill -9 %d", pid); int32_t ret = tsnprintf(buf, tListLen(buf), "kill -9 %d", pid);
if (ret > 0) { if (ret > 0) {
uInfo("kill rsync program pid:%d", pid);
system(buf); system(buf);
} }
} }

View File

@ -276,7 +276,11 @@ int32_t taosGetPIdByName(const char* name, int32_t* pPId) {
} }
} }
return 0; if ((*pPId) == -1) {
return TAOS_SYSTEM_ERROR(ESRCH);
} else {
return TSDB_CODE_SUCCESS;
}
} }
int32_t tsem_init(tsem_t* psem, int flags, unsigned int count) { int32_t tsem_init(tsem_t* psem, int flags, unsigned int count) {