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
-
Description#
tmux refuses
respawn-paneandrespawn-windowoutright while the old command is alive unless-ksays 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#
| Case | Payload | Description |
|---|---|---|
| OnlyIfDead | No payload | Refuse unless the pane or window is already dead. |
| Replacing | No payload | Kill whatever is running first. tmux's -k. |