Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

tmux.Running

Go
  • Python Unavailable
  • Ruby Unavailable
  • Lua Unavailable
  • TypeScript Unavailable
  • Rust Unavailable
  • Go
  • Java Unavailable
  • .NET Unavailable
  • C++ Unavailable
  • Swift Unavailable

View as Markdown

Module
tmux
Package
github.com/libtmux/libtmux-go/tmux
Source
tmux/session_run.go
struct tmux.Running
struct [source]
struct [source]
struct tmux.Running

Running is a command started by Session.Start : a real process, already under way, in a pane of its own. Running.Pane exposes that pane so its output can be streamed with Pane.OpenObservation or typed into with Pane.Writer while the command runs; Running.Wait and Running.Kill wait for and stop it. A line printed with nothing separating it from the command's own exit can race tmux's control-mode notification of it and never reach PaneObservation.Reader ; RunResult.Lines from Wait, a plain screen capture rather than that notification stream, always has it.

4 declared, 0 inherited

Members

  • Kill method Kill asks the tmux server to send SIGKILL to the process group running the command. It does not wait for the process to stop; call Wait to observe the resulting status or signal.
  • Pane method Pane returns the pane the command runs in, materialized immediately after Start returned. Like any materialized record it does not refresh itself; a call after Wait or Kill may no longer describe a live pane.
  • StreamTo method StreamTo copies what the command prints into destination as it prints it and then reports how it ended, so following a command and collecting its outcome are one blocking call rather than a goroutine the caller writes. It returns exactly what Running.Wait returns and, like Wait, removes the window unless RunOptions.Keep was set. destination is written only by this call, so it needs no synchronization of its own, and Running.Kill may be called from another goroutine while it runs.
  • Wait method 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.
Esc

Type to search.