# libtmux:kill-server

- **Package:** libtmux
- **Language:** Common Lisp
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-lisp/blob/c2e5fc4ed3befda21f45dfa5d5868c38fd138311/src/termination.lisp#L150
- **Public owner:** libtmux
- **Page:** https://libtmux.org/en/lisp/latest/reference/libtmux-kill-server/

```
(kill-server client &key cancel-token timeout output-limit)
```

Terminate CLIENT's preflight-accepted daemon and return a COMMAND-OUTCOME.
Success requires both a pre-dispatch receipt and observed exit of the server
process accepted during this call. Missing evidence signals OUTCOME-UNKNOWN;
cancellation or a deadline never causes an automatic retry. The connection
CLIENT stays open but its generation is invalidated after observed server death.
A failed exit wait retains :SERVER-EXIT-UNOBSERVED and the underlying
ERROR-CAUSE. CLOSE-CLIENT never calls this function.

See also: `libtmux:close-client`, `libtmux:kill-session`, `libtmux:outcome-phase`, `libtmux:outcome-status`.

## Parameters

- `client`
- `cancel-token?`
- `timeout?`
- `output-limit?`

## tmux command

The tmux commands behind `kill-server`.

- [`kill-server`](/en/tmux/latest/manual/kill-server/)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_kill_server_entry`](/en/tmux/latest/reference/c-variable-cmd_kill_server_entry/) (attribute)
- [`cmd_kill_server_exec`](/en/tmux/latest/reference/c-function-cmd-kill-server-c-cmd_kill_server_exec/) (function)

## Guides

Pages that discuss `kill-server`.

### Examples

- [Capture pane output](/en/lisp/latest/examples/capture-pane-output/)

### Guides

- [Attaching to tmux](/en/lisp/latest/guides/attaching-to-tmux/)
- [Getting started](/en/lisp/latest/guides/getting-started/)
- [Explicit operations](/en/lisp/latest/guides/operations/)
- [REPL tutorial](/en/lisp/latest/guides/tutorial/)
