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.

method libtmux-java latest

Pane.dead

Whether this pane's process has exited, read fresh rather than from the capture.

Source and package
Qualified name
io.github.libtmux.Pane.dead
Package
io.github.libtmux
Declared in
Pane
Distribution
io.github.libtmux:libtmux
Source
libtmux/src/main/java/io/github/libtmux/Pane.java

Description#

Dying is something that happens between reads, so a cached answer would report a pane that died after this handle was captured as alive forever — the trap a snapshot-backed isDead() would set, which is why there is no such accessor on the capture itself. This asks tmux directly instead, every time.

A dead pane is not necessarily a gone one: remain-on-exit keeps it around, still listed, to be read. A pane with no remain-on-exit is simply removed once its process exits — #refresh() on this handle then throws TargetGoneException, and this method throws too. Unlike every other command Pane sends, display-message -t does not error on a target it cannot resolve — it exits 0 with nothing on stdout — so a gone pane looks like a live one that answered nothing rather than like a failure. That empty read, and not a "can't find pane" from tmux, is what this method throws on: a real pane always answers 0 or 1 for this format, never nothing.

Raises
Esc

Type to search.

Reference previewOpen reference