mirror of
https://gitee.com/openharmony/startup_appspawn
synced 2024-11-22 22:50:21 +00:00
add prefork feature
Signed-off-by: yh <yanghao236@huawei.com> Change-Id: I899eb4e89cbe54eb8bda8b7f4a203e6ae1dfdd7f
This commit is contained in:
parent
9fca56deb8
commit
38a8d8fbde
@ -32,6 +32,7 @@ declare_args() {
|
||||
appspawn_unittest_coverage = false
|
||||
appspawn_mount_tmpshm = false
|
||||
appspawn_seccomp_privilege = false
|
||||
appspawn_support_prefork = true
|
||||
}
|
||||
|
||||
if (!defined(global_parts_info) ||
|
||||
|
@ -67,6 +67,9 @@ ohos_executable("appspawn") {
|
||||
if (is_debug || build_variant == "root") {
|
||||
defines += [ "DEBUG_BEGETCTL_BOOT" ]
|
||||
}
|
||||
if (appspawn_support_prefork) {
|
||||
defines += [ "APPSPAWN_SUPPORT_PREFORK" ]
|
||||
}
|
||||
|
||||
external_deps = [
|
||||
"c_utils:utils",
|
||||
|
@ -770,6 +770,7 @@ static int AppSpawnProcessMsgForPrefork(AppSpawnContent *content, AppSpawnClient
|
||||
|
||||
static bool IsSupportPrefork(AppSpawnContent *content, AppSpawnClient *client)
|
||||
{
|
||||
#ifdef APPSPAWN_SUPPORT_PREFORK
|
||||
if (client == NULL || content == NULL) {
|
||||
return false;
|
||||
}
|
||||
@ -782,6 +783,7 @@ static bool IsSupportPrefork(AppSpawnContent *content, AppSpawnClient *client)
|
||||
&& !CheckAppMsgFlagsSet(property, APP_FLAGS_CHILDPROCESS)) {
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user