Expand description
Python 子进程的创建与 stderr 日志转发。
架构位置:由 crate::runtime::Supervisor 调用,产出的 stdin / stdout 分别交给
crate::bridge::Writer 与 crate::bridge::protocol::FrameCodec。
不变量:stdout 专用于协议帧,日志只能走 stderr(Python SDK 会把 sys.stdout 重定向到 stderr)。
Structs§
- Process
Config - 启动 Python 进程所需的参数。
- Spawned
- 已启动的子进程及其三个标准流。
Functions§
- spawn
- 按
config启动 Python 进程,三个标准流均为管道。 - spawn_
stderr_ logger - 启动后台任务,把 stderr 逐行转发到
log(target 为py-runtime)。