# process.child

## 功能

启动子进程并把句柄保存在当前 Process 对象中。

## 语法

```bt
process(program).child()
```

## 参数

无参数。

## 返回值

| 类型 | 说明 |
| ------ | ------ |
| Process | 返回共享同一子进程句柄的 Process 对象。 |

## 示例

```bt
child = process('cmd').args(['/C', 'exit 0']).child()
result = type(child)

// 输出：Process
print result
```

## 注意事项

- 同一 Process 克隆对象共享子进程句柄。
- 默认启动 stdout/stderr 管道，后续可通过 stdout_read、stdout_read_lines、stderr_read、stderr_read_lines 读取。
- 如果提前调用 inherit_stdio() 或 null_stdio()，子进程不会保留脚本侧可读取管道。
- 如果提前调用 stdin(text)，child() 会写入文本并关闭 stdin 管道，避免子进程长期等待输入。
