# cmd_attach_session_exec

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-attach-session.c#L177
- **Page:** https://libtmux.org/en/tmux/3.7c/reference/c-function-cmd-attach-session-c-cmd_attach_session_exec/

tmux command: [`attach-session`](/en/tmux/3.7c/manual/attach-session/)

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

## Parameters

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

## Calls

- [`cmd_attach_session`](/en/tmux/3.7c/reference/c-function-cmd_attach_session/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-attach-session.c#L181)
- [`cmd_get_args`](/en/tmux/3.7c/reference/c-function-cmd_get_args/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-attach-session.c#L179)

## Other function references

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

## Referenced by

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

## Referenced declarations

- [`cmd`](/en/tmux/3.7c/reference/c-struct-cmd/) (struct)
- [`cmd_retval`](/en/tmux/3.7c/reference/c-enum-cmd_retval/) (enum)
- [`cmdq_item`](/en/tmux/3.7c/reference/c-struct-cmdq_item/) (struct)
