# server_destroy_session

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-fn.c#L433
- **Page:** https://libtmux.org/en/tmux/3.2a/reference/c-function-server_destroy_session/

```c
void server_destroy_session(struct session *s)
```

## Parameters

- `s` (`struct session *`)

## Called by

- [`cmd_kill_session_exec`](/en/tmux/3.2a/reference/c-function-cmd-kill-session-c-cmd_kill_session_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-kill-session.c#L62)
- [`server_destroy_session_group`](/en/tmux/3.2a/reference/c-function-server-fn-c-server_destroy_session_group/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-fn.c#L393)
- [`window_tree_kill_each`](/en/tmux/3.2a/reference/c-function-window-tree-c-window_tree_kill_each/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-tree.c#L1109)

## Calls

- [`alerts_check_session`](/en/tmux/3.2a/reference/c-function-alerts_check_session/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-fn.c#L462)
- [`notify_client`](/en/tmux/3.2a/reference/c-function-notify_client/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-fn.c#L458)
- [`options_get_number`](/en/tmux/3.2a/reference/c-function-options_get_number/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-fn.c#L439)
- [`recalculate_sizes`](/en/tmux/3.2a/reference/c-function-recalculate_sizes/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-fn.c#L465)
- [`server_client_set_key_table`](/en/tmux/3.2a/reference/c-function-server_client_set_key_table/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-fn.c#L455)
- [`server_next_detached_session`](/en/tmux/3.2a/reference/c-function-server-fn-c-server_next_detached_session/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-fn.c#L443)
- [`server_next_session`](/en/tmux/3.2a/reference/c-function-server-fn-c-server_next_session/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-fn.c#L441)
- [`server_redraw_client`](/en/tmux/3.2a/reference/c-function-server_redraw_client/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-fn.c#L461)
- [`session_update_activity`](/en/tmux/3.2a/reference/c-function-session_update_activity/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-fn.c#L459)
- [`status_timer_start`](/en/tmux/3.2a/reference/c-function-status_timer_start/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-fn.c#L457)
- [`tty_update_client_offset`](/en/tmux/3.2a/reference/c-function-tty_update_client_offset/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-fn.c#L456)

## Referenced by

- [`server_client_push_stderr`](/en/tmux/3.2a/reference/c-function-server_client_push_stderr/) (function)

## Referenced declarations

- [`CLIENT_EXIT`](/en/tmux/3.2a/reference/c-define-tmux-h-client_exit/) (constant)
- [`session.entry`](/en/tmux/3.2a/reference/c-struct-session-entry/) (attribute)
- [`client.flags`](/en/tmux/3.2a/reference/c-struct-client-flags/) (attribute)
- [`session.last_attached_time`](/en/tmux/3.2a/reference/c-struct-session-last_attached_time/) (attribute)
- [`client.last_session`](/en/tmux/3.2a/reference/c-struct-client-last_session/) (attribute)
- [`session.options`](/en/tmux/3.2a/reference/c-struct-session-options/) (attribute)
- [`client.session`](/en/tmux/3.2a/reference/c-struct-client-session/) (attribute)
- [`session`](/en/tmux/3.2a/reference/c-struct-session/) (struct)
