1e41f4b71Sopenharmony_ci# @ohos.app.ability.ChildProcessArgs 2e41f4b71Sopenharmony_ci 3e41f4b71Sopenharmony_ciThe ChildProcessArgs module describes the parameters transferred to the child process. When starting a child process through [childProcessManager](js-apis-app-ability-childProcessManager.md), you can transfer parameters to the child process through **ChildProcessArgs**. 4e41f4b71Sopenharmony_ci 5e41f4b71Sopenharmony_ci> **NOTE** 6e41f4b71Sopenharmony_ci> 7e41f4b71Sopenharmony_ci> The initial APIs of this module are supported since API version 12. Newly added APIs will be marked with a superscript to indicate their earliest API version. 8e41f4b71Sopenharmony_ci> 9e41f4b71Sopenharmony_ci> The APIs of this module can be used only in the stage model. 10e41f4b71Sopenharmony_ci 11e41f4b71Sopenharmony_ci## Modules to Import 12e41f4b71Sopenharmony_ci 13e41f4b71Sopenharmony_ci```ts 14e41f4b71Sopenharmony_ciimport { ChildProcessArgs } from '@kit.AbilityKit'; 15e41f4b71Sopenharmony_ci``` 16e41f4b71Sopenharmony_ci 17e41f4b71Sopenharmony_ci## Properties 18e41f4b71Sopenharmony_ci 19e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Ability.AbilityRuntime.Core 20e41f4b71Sopenharmony_ci 21e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 22e41f4b71Sopenharmony_ci| ----------- | -------------------- | ---- | ------------------------------------------------------------ | 23e41f4b71Sopenharmony_ci| entryParams | string | No | Custom parameters to be transparently transmit to the child process. The parameters can be obtained through **args.entryParams** in [ChildProcess.onStart](js-apis-app-ability-childProcess.md#childprocessonstart). The maximum data volume supported by **entryParams** is 150 KB.| 24e41f4b71Sopenharmony_ci| fds | Record<string, number> | No | File Descriptor (FD) handles, which are used for communication between the main process and child process. They are passed to the child process in the form of key-value pairs, where **key** is a custom string and **value** is a DF handle. The FD handles can be obtained through **args.fds** in [ChildProcess.onStart](js-apis-app-ability-childProcess.md#childprocessonstart).<br>NOTE<br>- **fds** supports a maximum of 16 groups. In each group, **key** contains a maximum of 20 characters.<br>- The ID of a handle passed to the child process may change, but the handle always points to the same file.| 25e41f4b71Sopenharmony_ci 26e41f4b71Sopenharmony_ci**Example** 27e41f4b71Sopenharmony_ci 28e41f4b71Sopenharmony_ciFor details about how to obtain the context in the example, see [Obtaining the Context of UIAbility](../../application-models/uiability-usage.md#obtaining-the-context-of-uiability). 29e41f4b71Sopenharmony_ci 30e41f4b71Sopenharmony_ci```ts 31e41f4b71Sopenharmony_ci// In the main process: 32e41f4b71Sopenharmony_ciimport { common, ChildProcessArgs, childProcessManager } from '@kit.AbilityKit'; 33e41f4b71Sopenharmony_ciimport fs from '@ohos.file.fs'; 34e41f4b71Sopenharmony_ci 35e41f4b71Sopenharmony_cilet context = getContext(this) as common.UIAbilityContext; 36e41f4b71Sopenharmony_cilet path = context.filesDir + "/test.txt"; 37e41f4b71Sopenharmony_cilet file = fs.openSync(path, fs.OpenMode.READ_ONLY | fs.OpenMode.CREATE); 38e41f4b71Sopenharmony_cilet args: ChildProcessArgs = { 39e41f4b71Sopenharmony_ci entryParams: "testParam", 40e41f4b71Sopenharmony_ci fds: { 41e41f4b71Sopenharmony_ci "key1": file.fd 42e41f4b71Sopenharmony_ci } 43e41f4b71Sopenharmony_ci}; 44e41f4b71Sopenharmony_cichildProcessManager.startArkChildProcess("entry/./ets/process/DemoProcess.ets", args); 45e41f4b71Sopenharmony_ci``` 46e41f4b71Sopenharmony_ci 47e41f4b71Sopenharmony_ci```ts 48e41f4b71Sopenharmony_ci// In the child process: 49e41f4b71Sopenharmony_ciimport { ChildProcess, ChildProcessArgs } from '@kit.AbilityKit'; 50e41f4b71Sopenharmony_ci 51e41f4b71Sopenharmony_ciexport default class DemoProcess extends ChildProcess { 52e41f4b71Sopenharmony_ci 53e41f4b71Sopenharmony_ci onStart(args?: ChildProcessArgs) { 54e41f4b71Sopenharmony_ci let entryParams = args?.entryParams; 55e41f4b71Sopenharmony_ci let fd = args?.fds?.key1; 56e41f4b71Sopenharmony_ci // .. 57e41f4b71Sopenharmony_ci } 58e41f4b71Sopenharmony_ci} 59e41f4b71Sopenharmony_ci``` 60