本页还没有译文
本页 4 段还没译成Español,下面显示的是英文原文。Read stdout from a child process
还没翻译译自英文(bun.com)本页 4 段都还没译
When you spawn a child process with Bun.spawn(), proc.stdout is a ReadableStream of the child's stdout.
const proc = Bun.spawn(["echo", "hello"]);
const output = await proc.stdout.text();
output; // => "hello\n"To pipe the child process's stdout to the parent's stdout instead, set the stdout option to "inherit".
const proc = Bun.spawn(["echo", "hello"], {
stdout: "inherit",
});See Child processes.
AI 翻译查看英文原文