Running.Wait
Wait blocks until the command exits, on tmux's own wait-for signal backed by a widening liveness check, and reports its exit status and what its terminal showed. It removes the window Start created unless RunOptions.Keep was set. A command whose process tmux never reaps has no outcome to report, and Wait ends with ErrOutcomeUnrecorded rather than the zero status that would make a failed command look successful.
Source and package
- Qualified name
-
tmux.Running. Wait - Package
- tmux
- Declared in
Running- Distribution
- github.com/libtmux/libtmux-go/tmux
- Source
- tmux/session_run.go
-
Description#
Wait may be called more than once and concurrently; every call observes the same completion. The outcome is read once, as soon as any call sees the command end, on a context no caller's cancellation reaches, because from then on it belongs to every caller. A call whose context ends first reports that context and leaves the window alone; a later call gets the outcome.
On a
Connection-bound session the wait holds a control client of its own rather than a lane, and ending it closes that client. Closing the connection ends it withErrControlClosed.- Parameters