Upterm

Instant Terminal Sharing

View project on GitHub

upterm session wait

Wait for a session to end

Synopsis

Wait for a session to end, given its name or session ID, and exit with its outcome.

NAME|ID is the session’s name (the one ‘upterm host’ printed, or –name gave it) or its session ID; ‘upterm session list’ shows both.

Given a name, it waits for the session that holds the name when it starts, so let ‘upterm host –detach’ return before you wait, as in the example. A session that has already ended is reported from its record, which ‘upterm session list’ deletes once it is 7 days old.

Exit status follows the session: its command’s status when the command exited; 0 when it was stopped, or no guest joined within its join timeout; 128+N when the host or its command was killed by signal N; 125 when the outcome can’t be known or read, when no session has the name, or for a usage or configuration error. A command can exit 125 too; ‘upterm session info NAME -o json’ has the reason. Ctrl-C stops waiting, with 130 on Unix, and leaves the session running.

upterm session wait NAME|ID [flags]

Examples

  # Wait for a detached session and take its exit status:
  upterm host --detach --accept --name build -- make
  upterm session wait build

  # Wait for a session given its session ID:
  upterm session wait d3k5fia7m4us73ehblug

Options

  -h, --help   help for wait

Options inherited from parent commands

      --debug   Enable debug logging (log file: /home/user/.local/state/upterm/upterm.log). A non-empty DEBUG turns it on too.

SEE ALSO

Auto generated by spf13/cobra on 18-Oct-2026