# 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.