# cmd_kill_session_exec

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-kill-session.c#L46
- **Page:** https://libtmux.org/en/tmux/latest/reference/c-function-cmd-kill-session-c-cmd_kill_session_exec/

tmux command: [`kill-session`](/en/tmux/latest/manual/kill-session/)

```c
static enum cmd_retval cmd_kill_session_exec(struct cmd *, struct cmdq_item *)
```

## Parameters

- `self` (`struct cmd *`)
- `item` (`struct cmdq_item *`)

## Calls

- [`args_has`](/en/tmux/latest/reference/c-function-args_has/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-kill-session.c#L54)
- [`cmd_get_args`](/en/tmux/latest/reference/c-function-cmd_get_args/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-kill-session.c#L48)
- [`cmdq_get_target`](/en/tmux/latest/reference/c-function-cmdq_get_target/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-kill-session.c#L49)
- [`server_destroy_session`](/en/tmux/latest/reference/c-function-server_destroy_session/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-kill-session.c#L63)
- [`server_redraw_session`](/en/tmux/latest/reference/c-function-server_redraw_session/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-kill-session.c#L59)
- [`session_destroy`](/en/tmux/latest/reference/c-function-session_destroy/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-kill-session.c#L64)

## Other function references

- [`session_group_contains`](/en/tmux/latest/reference/c-function-session_group_contains/) (function)

## Referenced by

- [`cmd_kill_session_entry`](/en/tmux/latest/reference/c-variable-cmd_kill_session_entry/) (attribute)

## Referenced declarations

- [`cmd`](/en/tmux/latest/reference/c-struct-cmd/) (struct)
- [`CMD_RETURN_NORMAL`](/en/tmux/latest/reference/c-enum-cmd_retval-cmd_return_normal/) (constant)
- [`cmd_retval`](/en/tmux/latest/reference/c-enum-cmd_retval/) (enum)
- [`cmdq_item`](/en/tmux/latest/reference/c-struct-cmdq_item/) (struct)
- [`window.flags`](/en/tmux/latest/reference/c-struct-window-flags/) (attribute)
- [`winlink.flags`](/en/tmux/latest/reference/c-struct-winlink-flags/) (attribute)
- [`cmd_find_state.s`](/en/tmux/latest/reference/c-struct-cmd_find_state-s/) (attribute)
- [`session_group.sessions`](/en/tmux/latest/reference/c-struct-session_group-sessions/) (attribute)
- [`winlink.window`](/en/tmux/latest/reference/c-struct-winlink-window/) (attribute)
- [`WINDOW_ALERTFLAGS`](/en/tmux/latest/reference/c-define-tmux-h-window_alertflags/) (constant)
- [`session.windows`](/en/tmux/latest/reference/c-struct-session-windows/) (attribute)
- [`WINLINK_ALERTFLAGS`](/en/tmux/latest/reference/c-define-tmux-h-winlink_alertflags/) (constant)
