# process.wait

## 功能

等待已启动子进程退出。

## 语法

```bt
process(program).child().wait()
```

## 参数

无参数。

## 返回值

| 类型 | 说明 |
| ------ | ------ |
| Int/Empty | 有子进程时返回退出码；没有子进程句柄返回 Empty。 |

## 示例

```bt
result = process('cmd').args(['/C', 'exit 0']).child().wait()

// 输出：0
print result
```

## 注意事项

- 该方法会阻塞当前流程直到子进程退出。
