# process.stdin ## 功能 设置要写入子进程标准输入的文本。 ## 语法 ```bt process(program).stdin(text) ``` ## 参数 | 参数 | 类型 | 必填 | 默认值 | 说明 | | ------ | ------ | ------ | ------ | ------ | | text | Any | 否 | Null | 标准输入文本。 | ## 返回值 | 类型 | 说明 | | ------ | ------ | | Process | 返回新的进程构建器。 | ## 示例 ```bt cmd = process('cmd').stdin('BT') result = type(cmd) // 输出:Process print result ``` ## 注意事项 - 设置 stdin 后,child() 会使用 piped 模式写入文本并关闭 stdin 管道。 - stdin(text) 只配置待写入文本;真正写入发生在 child() 启动子进程时。 - 未设置 stdin(text) 时,child() 默认关闭子进程 stdin,不继承父进程 stdin。