# Read stdout from a child process (/docs/guides/process/spawn-stdout)

<!-- agent-signals: reading_time_min: 1 · est_tokens: 127 · updated: 2026-07-28 -->
Related: [Parse command-line arguments](/docs/guides/process/argv.md), [Listen for CTRL+C](/docs/guides/process/ctrl-c.md), [Spawn a child process and communicate using IPC](/docs/guides/process/ipc.md), [Get the process uptime in nanoseconds](/docs/guides/process/nanoseconds.md), [Listen to OS signals](/docs/guides/process/os-signals.md), [Read stderr from a child process](/docs/guides/process/spawn-stderr.md)

When you spawn a child process with [`Bun.spawn()`](/runtime/child-process), `proc.stdout` is a `ReadableStream` of the child's `stdout`.

```ts
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"`.

```ts
const proc = Bun.spawn(["echo", "hello"], {
  stdout: "inherit",
});
```

***

See [Child processes](/runtime/child-process).
