1 Star 0 Fork 5.1K

youguilin / docs

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
appspawn-module.md 3.84 KB
一键复制 编辑 原始数据 按行查看 历史
NEEN 提交于 2021-03-12 17:59 . !197 Docs Update version 1.0.1

appspawn Module

After appspawn is started by init, its service name (appspawn) is registered with the IPC framework. Upon receiving inter-process messages, appspawn starts the application service based on the message parsing result, and grants the corresponding permission to the application service.

You can obtain the macro definition APPSPAWN_SERVICE_NAME corresponding to appspawn by including the header file base\startup\appspawn_lite\services\include\appspawn_service.h. Due to some constraints on the security subsystem, only Ability Manager Service (AMS) has the permission to send inter-process messages to appspawn.

The messages are in JSON format, as shown in the following:

"{\"bundleName\":\"testvalid1\",\"identityID\":\"1234\",\"uID\":1000,\"gID\":1000,\"capability\":[0]}"

Table 1 Keys in messages

Key

Description

bundleName

Name of the application service process to be started. The length ranges from 7 bytes to 127 bytes.

identityID

Identifier generated by the AMS for the new process. The length ranges from 1 byte to 24 bytes. The appspawn process passes the value to the new process.

uID

UID of the application service process to be started. The value must be a positive number.

gID

GID of the application service process to be started. The value must be a positive number.

capability

Capability permissions required by the application service process to be started. A maximum of 10 capability permissions are allowed.

1
https://gitee.com/yougl/docs.git
git@gitee.com:yougl/docs.git
yougl
docs
docs
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891