# libtmux:lock-server

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

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

Request locking of all attached frontends on CLIENT's daemon.
Return a COMMAND-OUTCOME after guarded dispatch. Live frontend membership
determines the recipients; this is wider than one captured session. Each
frontend runs its configured lock-command. Control clients, suspended
frontends and empty/oversized commands are skipped. Success acknowledges
the request, not startup, completion or authentication. Blocks under shared
preflight/dispatch limits and returns no replacement. Failures retain their
outcome. Lock programs belong to the frontends; closing CLIENT leaves them
running. Never retries.

See also: `libtmux:error-outcome`, `libtmux:lock-client`, `libtmux:lock-session`, `libtmux:outcome-status`, `libtmux:set-option`.

## Parameters

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

## tmux command

The tmux commands behind `lock-server`.

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

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_lock_server_entry`](/en/tmux/latest/reference/c-variable-cmd_lock_server_entry/) (attribute)
- [`cmd_lock_server_exec`](/en/tmux/latest/reference/c-function-cmd-lock-server-c-cmd_lock_server_exec/) (function)

## Guides

Pages that discuss `lock-server`.

- [Explicit operations](/en/lisp/latest/guides/operations/)
