clear reserved pid

Signed-off-by: yh <yanghao236@huawei.com>
Change-Id: I9f5d3812681e041e07152bbdab60a516330e9bc0
This commit is contained in:
yh 2024-11-13 11:19:48 +08:00
parent 95ed08b2e8
commit d24805d10c

View File

@ -109,6 +109,14 @@ static void StopAppSpawn(void)
OH_ListInit(&appInfo->node);
free(appInfo);
}
AppSpawnContent *content = GetAppSpawnContent();
if (content != NULL && content->reservedPid > 0) {
int ret = kill(content->reservedPid, SIGKILL);
APPSPAWN_CHECK_ONLY_LOG(ret == 0, "kill reserved pid %{public}d failed %{public}d %{public}d",
content->reservedPid, ret, errno);
content->reservedPid = 0;
}
TraversalSpawnedProcess(AppQueueDestroyProc, NULL);
APPSPAWN_LOGI("StopAppSpawn ");
#ifdef APPSPAWN_HISYSEVENT