Message: 进程延迟退出

Signed-off-by: 郑冬冬冬 <zhengchengkai@huawei.com>
This commit is contained in:
郑冬冬冬
2026-01-21 10:27:08 +08:00
parent f85e469e23
commit deafc8149b
@@ -153,6 +153,7 @@ constexpr int32_t UNSPECIFIED_USERID = -2;
constexpr int32_t JS_ERROR_EXIT = -2;
constexpr int32_t TIME_OUT = 120;
constexpr int32_t DEFAULT_SLEEP_TIME = 100000;
constexpr int32_t PROCESS_EXIT_DELAY_TIME = 20000;
enum class SignalType {
SIGNAL_JSHEAP_OLD,
@@ -2123,6 +2124,7 @@ void MainThread::ProcessExit(const ProcessExitInfo& info)
TAG_LOGW(AAFwkTag::APPKIT, "hisysevent write result=%{public}d, send event [FRAMEWORK,PROCESS_KILL],"
" pid=%{public}d, processName=%{public}s, msg=%{public}s, foreground=%{public}d, isUncatchable=%{public}d",
result, info.pid, info.processName.c_str(), KILL_REASON, info.foreground, info.isUncatchable);
usleep(PROCESS_EXIT_DELAY_TIME);
_exit(JS_ERROR_EXIT);
}