Signed-off-by: LXinJie <liuxinjie6@huawei.com>
This commit is contained in:
LXinJie 2024-11-30 17:11:38 +08:00
parent b9e71d9f7c
commit dbbd760b40
5 changed files with 10 additions and 1 deletions

View File

@ -69,7 +69,8 @@
"cJSON",
"json",
"faultloggerd",
"dlp_permission_service"
"dlp_permission_service",
"ffrt"
],
"third_party": [
"bounds_checking_function",

View File

@ -26,6 +26,7 @@
#include "appspawn_utils.h"
#ifndef OHOS_LITE
#include "appspawn_manager.h"
#include "ffrt_inner.h"
#endif
#define MAX_FORK_TIME (30 * 1000) // 30ms
@ -120,6 +121,7 @@ int AppSpawnChild(AppSpawnContent *content, AppSpawnClient *client)
static int CloneAppSpawn(void *arg)
{
APPSPAWN_CHECK(arg != NULL, return -1, "Invalid content for appspawn");
ffrt_child_init();
AppSpawnForkArg *forkArg = (AppSpawnForkArg *)arg;
ProcessExit(AppSpawnChild(forkArg->content, forkArg->client));
return 0;

View File

@ -75,6 +75,7 @@ ohos_executable("appspawn") {
"cJSON:cjson",
"c_utils:utils",
"config_policy:configpolicy_util",
"ffrt:libffrt",
"hilog:libhilog",
"hitrace:hitrace_meter",
"init:libbegetutil",
@ -131,6 +132,7 @@ ohos_shared_library("appspawn_helper") {
"-fstack-protector-all",
]
external_deps = [
"ffrt:libffrt",
"hilog:libhilog",
"init:libbegetutil",
]
@ -185,6 +187,7 @@ ohos_executable("cjappspawn") {
"cJSON:cjson",
"c_utils:utils",
"config_policy:configpolicy_util",
"ffrt:libffrt",
"hilog:libhilog",
"hitrace:hitrace_meter",
"init:libbegetutil",
@ -256,6 +259,7 @@ ohos_executable("nativespawn") {
"cJSON:cjson",
"c_utils:utils",
"config_policy:configpolicy_util",
"ffrt:libffrt",
"hilog:libhilog",
"hitrace:hitrace_meter",
"init:libbegetutil",

View File

@ -87,6 +87,7 @@ ohos_unittest("AppSpawn_client_ut") {
"cJSON:cjson",
"c_utils:utils",
"config_policy:configpolicy_util",
"ffrt:libffrt",
"hilog:libhilog",
"hitrace:hitrace_meter",
"init:libbegetutil",

View File

@ -171,6 +171,7 @@ ohos_unittest("AppSpawn_ut") {
"c_utils:utils",
"config_policy:configpolicy_util",
"eventhandler:libeventhandler",
"ffrt:libffrt",
"hilog:libhilog",
"hitrace:hitrace_meter",
"init:libbegetutil",