# LibTmux.Program.await/2

- **Module:** LibTmux
- **Package:** libtmux
- **Language:** Elixir
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-elixir/blob/ce52194a746ce1d6785c352a731cff734e0d11ce/lib/libtmux/program.ex#L260
- **Page:** https://libtmux.org/en/elixir/latest/reference/libtmux-program-await-2/

```
await(program, timeout)
@spec await(t(), 1..600_000) ::
        {:ok, result()} | {:error, LibTmux.Error.t()}
```

Waits for application retirement and collects the final rendered screen.

Concurrent callers can wait on the same handle, each with its own timeout.
A timed-out wait sends no cancellation. Each caller reads the retained
exit evidence and observes the rendered screen within its remaining
budget. Capture can fail after the application's exit is known.

## Parameters

- `program` (`t()`)
- `timeout` (`1..600_000`)
