# cmd_detach_client_exec

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-detach-client.c#L58
- **Page:** https://libtmux.org/en/tmux/3.2a/reference/c-function-cmd-detach-client-c-cmd_detach_client_exec/

tmux command: [`detach-client`](/en/tmux/3.2a/manual/detach-client/)

tmux command: [`suspend-client`](/en/tmux/3.2a/manual/suspend-client/)

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

## Parameters

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

## Calls

- [`args_get`](/en/tmux/3.2a/reference/c-function-args_get/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-detach-client.c#L65)
- [`args_has`](/en/tmux/3.2a/reference/c-function-args_has/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-detach-client.c#L72)
- [`cmd_get_args`](/en/tmux/3.2a/reference/c-function-cmd_get_args/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-detach-client.c#L60)
- [`cmd_get_entry`](/en/tmux/3.2a/reference/c-function-cmd_get_entry/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-detach-client.c#L67)
- [`cmdq_get_source`](/en/tmux/3.2a/reference/c-function-cmdq_get_source/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-detach-client.c#L61)
- [`cmdq_get_target_client`](/en/tmux/3.2a/reference/c-function-cmdq_get_target_client/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-detach-client.c#L62)
- [`server_client_detach`](/en/tmux/3.2a/reference/c-function-server_client_detach/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-detach-client.c#L86)
- [`server_client_exec`](/en/tmux/3.2a/reference/c-function-server_client_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-detach-client.c#L84)
- [`server_client_suspend`](/en/tmux/3.2a/reference/c-function-server_client_suspend/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-detach-client.c#L68)

## Referenced by

- [`cmd_detach_client_entry`](/en/tmux/3.2a/reference/c-variable-cmd_detach_client_entry/) (attribute)
- [`cmd_suspend_client_entry`](/en/tmux/3.2a/reference/c-variable-cmd_suspend_client_entry/) (attribute)

## Referenced declarations

- [`cmd`](/en/tmux/3.2a/reference/c-struct-cmd/) (struct)
- [`CMD_RETURN_NORMAL`](/en/tmux/3.2a/reference/c-enum-cmd_retval-cmd_return_normal/) (constant)
- [`CMD_RETURN_STOP`](/en/tmux/3.2a/reference/c-enum-cmd_retval-cmd_return_stop/) (constant)
- [`cmd_retval`](/en/tmux/3.2a/reference/c-enum-cmd_retval/) (enum)
- [`cmd_suspend_client_entry`](/en/tmux/3.2a/reference/c-variable-cmd_suspend_client_entry/) (attribute)
- [`cmdq_item`](/en/tmux/3.2a/reference/c-struct-cmdq_item/) (struct)
- [`session.entry`](/en/tmux/3.2a/reference/c-struct-session-entry/) (attribute)
- [`MSG_DETACH`](/en/tmux/3.2a/reference/c-enum-msgtype-msg_detach/) (constant)
- [`MSG_DETACHKILL`](/en/tmux/3.2a/reference/c-enum-msgtype-msg_detachkill/) (constant)
- [`cmd_find_state.s`](/en/tmux/3.2a/reference/c-struct-cmd_find_state-s/) (attribute)
