# Libtmux_eio.Client.respawn_pane

- **Module:** Libtmux_eio
- **Package:** libtmux-eio
- **Language:** OCaml
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-ocaml/blob/205dfda49742592b479247049d186956e4a4cfe9/eio/libtmux_eio.mli#L574
- **Public owner:** Libtmux_eio
- **Page:** https://libtmux.org/en/ocaml/latest/reference/libtmux_eio-client-respawn_pane/

```
val respawn_pane :
  ?kill_running:bool ->
  t ->
  Libtmux.Pane.target -> Libtmux.Spawn.t -> (unit, Libtmux.Error.t) result
```

Start the supplied command in the existing pane. A running process causes failure unless `kill_running:true` explicitly replaces it. The pane ID remains unchanged.

## Parameters

- `kill_running?` (`bool`)
- `arg1` (`t`)
- `arg2` (`Libtmux.Pane.target`)
- `arg3` (`Libtmux.Spawn.t`)

## tmux command

The tmux commands behind `respawn_pane`.

- [`respawn-pane`](/en/tmux/latest/manual/respawn-pane/)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_respawn_pane_entry`](/en/tmux/latest/reference/c-variable-cmd_respawn_pane_entry/) (attribute)
- [`cmd_respawn_pane_exec`](/en/tmux/latest/reference/c-function-cmd-respawn-pane-c-cmd_respawn_pane_exec/) (function)

## In other ports

Restart a pane's command

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Pane.respawn`](/en/py/latest/reference/libtmux-pane-respawn/) (method) |
| Ruby | [`LibTmux::Pane#respawn`](/en/ruby/latest/reference/libtmux-pane-respawn/) (method) |
| Lua | [`libtmux.Pane:respawn`](/en/lua/latest/reference/libtmux-pane-respawn/) (method) |
| Erlang | [`tmux_pane:respawn/2`](/en/erlang/latest/reference/tmux_pane-respawn-2/) (function) |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | [`pane.Pane.respawn`](/en/ts/latest/reference/pane-pane-respawn/) (method) |
| Rust | [`pane.Pane.respawn`](/en/rs/latest/reference/pane-pane-respawn/) (method) |
| Go | [`tmux.Pane.Respawn`](/en/go/latest/reference/tmux-pane-respawn/) (method) |
| Java | [`io.github.libtmux.Pane.respawn`](/en/java/latest/reference/io-github-libtmux-pane-pane-respawn/) (method) |
| C# | [`LibTmux.Pane.RespawnAsync`](/en/csharp/latest/reference/libtmux-pane-respawnasync/) (method) |
| C++ | [`libtmux::Pane::respawn`](/en/cxx/latest/reference/libtmux-pane-respawn/) (method) |
| Swift | [`Server.respawn(_:running:killingExisting:)`](/en/swift/latest/reference/server-respawn(_-running-killingexisting-)/) (method) |
| Perl | No dedicated equivalent in the selected Perl surface. Explicit Server::cmd remains available for native tmux commands. |

No equivalent is recorded in PowerShell, Julia, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.
