# libtmux:start-daemon

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

```
(start-daemon &key (program "tmux") (environment nil environment-p) working-directory temporary-directory (timeout 30) (output-limit 1048576) cancel-token)
```

Start an owned empty-config daemon on a fresh private socket and await readiness.
Uses the qualified SBCL/Linux backend and explicit /dev/null configuration.
ENVIRONMENT is a finite list/vector of distinct NAME=VALUE strings; omission
copies the caller environment, and NIL selects an empty input environment.
Tmux selectors, socket activation and launcher controls are removed. Caller
locale is preserved; Bash shell metadata is not byte-transparent. Environment
values and the native executable remain trusted application configuration.
WORKING-DIRECTORY defaults to the captured current directory. The owner creates
a fresh directory under TEMPORARY-DIRECTORY (default UIOP's temporary directory).
Its canonical ancestors must be owned by this user or root; writable ancestors
must have the sticky bit. No existing daemon or endpoint is adopted.
TIMEOUT is one startup deadline after input preparation, including version and
readiness IPC. OUTPUT-LIMIT must be at least two bytes: half bounds daemon
lifetime diagnostics; the remainder bounds version/readiness output. Cleanup
adds bounded waits; synchronous setup and scheduling can extend caller wall time.
CANCEL-TOKEN affects startup only; after READY, STOP-DAEMON owns cancellation.
Signals DAEMON-START-FAILED with the original cause and owner on startup failure.

See also: `libtmux:error-daemon`, `libtmux:open-client`, `libtmux:stop-daemon`, `libtmux:with-daemon`.

## Parameters

- `program?`
- `environment?`
- `working-directory?`
- `temporary-directory?`
- `timeout?`
- `output-limit?`
- `cancel-token?`
