# Server.respawn(_:running:killingExisting:)

- **Module:** Server
- **Package:** libtmux-swift
- **Language:** Swift
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-swift/blob/f02a4668570e1cc5198c941413750e021f42c214/Sources/LibTmux/Navigation.swift#L295
- **Page:** https://libtmux.org/reference/swift/server-respawn(_-running-killingexisting-)/

```
Server.respawn(_:running:killingExisting:)(pane: Pane, running: [String], killingExisting: Bool) -> ()
```

Restarts the command in a pane.

- Parameters:
  - pane: the pane to restart.
  - command: what to run instead. Omitted, tmux repeats the command
    the pane was created with.
  - killingExisting: replaces whatever is still running, rather
    than refusing while the pane is busy.

## Raises

- `TmuxError`
