# cmd_kill_window_exec

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-kill-window.c#L56
- **Page:** https://libtmux.org/en/tmux/3.7c/reference/c-function-cmd-kill-window-c-cmd_kill_window_exec/

tmux command: [`kill-window`](/en/tmux/3.7c/manual/kill-window/)

tmux command: [`unlink-window`](/en/tmux/3.7c/manual/unlink-window/)

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

## Parameters

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

## Calls

- [`args_has`](/en/tmux/3.7c/reference/c-function-args_has/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-kill-window.c#L66)
- [`cmd_get_args`](/en/tmux/3.7c/reference/c-function-cmd_get_args/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-kill-window.c#L58)
- [`cmd_get_entry`](/en/tmux/3.7c/reference/c-function-cmd_get_entry/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-kill-window.c#L65)
- [`cmdq_error`](/en/tmux/3.7c/reference/c-function-cmdq_error/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-kill-window.c#L67)
- [`cmdq_get_target`](/en/tmux/3.7c/reference/c-function-cmdq_get_target/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-kill-window.c#L59)
- [`recalculate_sizes`](/en/tmux/3.7c/reference/c-function-recalculate_sizes/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-kill-window.c#L71)
- [`server_kill_window`](/en/tmux/3.7c/reference/c-function-server_kill_window/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-kill-window.c#L85)
- [`server_renumber_all`](/en/tmux/3.7c/reference/c-function-server_renumber_all/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-kill-window.c#L104)
- [`server_unlink_window`](/en/tmux/3.7c/reference/c-function-server_unlink_window/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-kill-window.c#L70)

## Other function references

- [`session_is_linked`](/en/tmux/3.7c/reference/c-function-session_is_linked/) (function)

## Referenced by

- [`cmd_kill_window_entry`](/en/tmux/3.7c/reference/c-variable-cmd_kill_window_entry/) (attribute)
- [`cmd_unlink_window_entry`](/en/tmux/3.7c/reference/c-variable-cmd_unlink_window_entry/) (attribute)

## Referenced declarations

- [`cmd`](/en/tmux/3.7c/reference/c-struct-cmd/) (struct)
- [`CMD_RETURN_ERROR`](/en/tmux/3.7c/reference/c-enum-cmd_retval-cmd_return_error/) (constant)
- [`CMD_RETURN_NORMAL`](/en/tmux/3.7c/reference/c-enum-cmd_retval-cmd_return_normal/) (constant)
- [`cmd_retval`](/en/tmux/3.7c/reference/c-enum-cmd_retval/) (enum)
- [`cmd_unlink_window_entry`](/en/tmux/3.7c/reference/c-variable-cmd_unlink_window_entry/) (attribute)
- [`cmdq_item`](/en/tmux/3.7c/reference/c-struct-cmdq_item/) (struct)
- [`cmd_find_state.s`](/en/tmux/3.7c/reference/c-struct-cmd_find_state-s/) (attribute)
- [`winlink.window`](/en/tmux/3.7c/reference/c-struct-winlink-window/) (attribute)
- [`session.windows`](/en/tmux/3.7c/reference/c-struct-session-windows/) (attribute)
- [`cmd_find_state.wl`](/en/tmux/3.7c/reference/c-struct-cmd_find_state-wl/) (attribute)
