1# @ohos.app.ability.ChildProcess 2 3开发者自定义子进程的基类。通过[childProcessManager](js-apis-app-ability-childProcessManager.md)启动子进程时,需要继承此类并重写入口方法。 4 5> **说明:** 6> 7> 本模块首批接口从API version 11开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 8> 9> 本模块接口仅可在Stage模型下使用。 10 11## 导入模块 12 13```ts 14import { ChildProcess } from '@kit.AbilityKit'; 15``` 16 17## ChildProcess.onStart 18 19onStart(args?: ChildProcessArgs): void 20 21子进程的入口方法,通过[childProcessManager](js-apis-app-ability-childProcessManager.md)启动子进程后调用。 22 23**系统能力**:SystemCapability.Ability.AbilityRuntime.Core 24 25**参数:** 26 27 | 参数名 | 类型 | 必填 | 说明 | 28 | -------- | -------- | -------- | -------- | 29 | args<sup>12+</sup> | [ChildProcessArgs](js-apis-app-ability-childProcessArgs.md) | 否 | 传递到子进程的参数。 | 30 31**示例:** 32```ts 33import { ChildProcess, ChildProcessArgs } from '@kit.AbilityKit'; 34 35export default class DemoProcess extends ChildProcess { 36 37 onStart(args?: ChildProcessArgs) { 38 let entryParams = args?.entryParams; 39 let fd = args?.fds?.key1; 40 // .. 41 } 42} 43```