# libtmux.Server.kill_on_exit

- **Module:** libtmux
- **Package:** libtmux
- **Language:** Python
- **Kind:** attribute
- **Source:** https://github.com/tmux-python/libtmux/blob/efdbb5637666b166358772ecc737b3807beab21e/src/libtmux/server.py#L632
- **Page:** https://libtmux.org/en/py/latest/reference/libtmux-server-kill_on_exit/

```py
libtmux.Server.kill_on_exit: bool = False
```

Whether leaving a ``with`` block kills the server.

Off by default. A :class:`Server` is a handle on a socket, not a
connection, so the same handle addresses a daemon whether or not this
process started it — scoping one is not grounds to destroy it.
