Core Library0.xAPI Reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

class libtmux-ts latest

TmuxServerRestartedError

A handle outlived the daemon that issued its id.

Source and package
Qualified name
TmuxServerRestartedError
Module
errors
Package
libtmux
Source
packages/libtmux/src/errors.ts
class errors.TmuxServerRestartedError

Description#

tmux numbers a restarted daemon's objects from the start, so %1 from before the restart names a pane that exists and belongs to somebody else. Raised from two places for one reason: the local check, when an acquisition has already seen the new daemon, and tmux itself, when it has not — the command carries a condition on the daemon's pid and start time and takes a branch that refuses instead of running.

delivery is always not_started: the whole point of the condition is that a refused command never ran, so retrying against a fresh handle is safe.

Examples#

try {
await pane.kill();
} catch (error) {
if (error instanceof TmuxServerRestartedError) {
// Read the server again; this pane's id belongs to another daemon now.
}
}

Members3#

Guides#

Pages that discuss TmuxServerRestartedError.

Esc

Type to search.

Reference previewOpen reference