From 4cc5af2faf35402891b067f3bc001a24f9c0ed2f Mon Sep 17 00:00:00 2001 From: cs1111 Date: Fri, 29 Aug 2025 13:04:10 +0800 Subject: [PATCH] fix:tsan exit Signed-off-by: cs1111 Change-Id: I57185af4a90f5e2cb83fd2ba29fd6fc9c81b41dc --- .../innerkits/signal_handler/dfx_dumprequest.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/interfaces/innerkits/signal_handler/dfx_dumprequest.c b/interfaces/innerkits/signal_handler/dfx_dumprequest.c index 429fe5047..88e040a02 100644 --- a/interfaces/innerkits/signal_handler/dfx_dumprequest.c +++ b/interfaces/innerkits/signal_handler/dfx_dumprequest.c @@ -395,16 +395,16 @@ static bool StartProcessdump(void) } else if (pid == 0) { if (!InitPipe()) { DFXLOGE("init pipe fail"); - _exit(errno); + syscall(SYS_exit, errno); } pid_t processDumpPid = ForkBySyscall(); if (processDumpPid < 0) { DFXLOGE("Failed to fork processdump(%{public}d)", errno); - _exit(errno); + syscall(SYS_exit, errno); } else if (processDumpPid > 0) { int ret = ReadProcessDumpGetRegsMsg() == true ? 0 : errno; DFXLOGI("exit the processdump parent process."); - _exit(ret); + syscall(SYS_exit, ret); } else { uint64_t endTime; int tid; @@ -422,7 +422,7 @@ static bool StartProcessdump(void) } else { DFXLOGI("current has spend all time, not execl processdump"); } - _exit(0); + syscall(SYS_exit, 0); } } return WaitProcessExitTimeout(pid, WAITPID_TIMEOUT); @@ -443,10 +443,10 @@ static bool StartVMProcessUnwind(void) GetAbsTimeMilliSecondsCInterce() - startTime); g_vmRealPid = GetRealPid(); DFXLOGI("vm prorcecc read pid = %{public}ld", g_vmRealPid); - _exit(0); + syscall(SYS_exit, 0); } else { DFXLOGI("exit dummy vm process"); - _exit(0); + syscall(SYS_exit, 0); } } -- Gitee