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.

enum libtmux-rs latest

Respawn

What to do about a process still running where one is being respawned.

Source and package
Qualified name
libtmux::window::Respawn
Module
window
Package
libtmux
Source
crates/libtmux/src/window.rs
enum window.Respawn

Description#

tmux refuses respawn-pane and respawn-window outright while the old command is alive unless -k says otherwise, so the choice is not a detail -- it decides whether a live process is killed.

Examples#

use libtmux::Respawn;
// Rerun the pane's own command, killing it first if it is still running.
pane.respawn(None::<&str>, Respawn::Replacing).await?;

Variants2#

Respawn variants
CasePayloadDescription
OnlyIfDead No payload Refuse unless the pane or window is already dead.
Replacing No payload Kill whatever is running first. tmux's -k.
Esc

Type to search.

Reference previewOpen reference