# libtmux:with-daemon

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

```
(with-daemon (name &rest options) &body body)
```

Bind a newly started daemon and stop the original owner on every exit.
Accepts START-DAEMON keyword options and body declarations. Preserves multiple
values and the primary nonlocal exit. A cleanup failure after normal completion
signals; during an existing exit it is retained for explicit inspection/retry.

See also: `libtmux:pending-daemon-cleanups`, `libtmux:start-daemon`, `libtmux:stop-daemon`.

## Parameters

- `(name &rest options)`
- `body`
