# server_client_open

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L334
- **Page:** https://libtmux.org/en/tmux/latest/reference/c-function-server_client_open/

```c
int server_client_open(struct client *c, char **cause)
```

## Parameters

- `c` (`struct client *`)
- `cause` (`char **`)

## Called by

- [`cmd_attach_session`](/en/tmux/latest/reference/c-function-cmd_attach_session/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-attach-session.c#L141)
- [`cmd_new_session_exec`](/en/tmux/latest/reference/c-function-cmd-new-session-c-cmd_new_session_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-new-session.c#L208)

## Calls

- [`tty_open`](/en/tmux/latest/reference/c-function-tty_open/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L360)
- [`xasprintf`](/en/tmux/latest/reference/c-function-xasprintf/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L351)
- [`xstrdup`](/en/tmux/latest/reference/c-function-xstrdup/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L356)

## Referenced declarations

- [`_PATH_TTY`](/en/tmux/latest/reference/c-define-compat-h-_path_tty/) (constant)
- [`client`](/en/tmux/latest/reference/c-struct-client/) (struct)
- [`CLIENT_CONTROL`](/en/tmux/latest/reference/c-define-tmux-h-client_control/) (constant)
- [`CLIENT_TERMINAL`](/en/tmux/latest/reference/c-define-tmux-h-client_terminal/) (constant)
- [`client.flags`](/en/tmux/latest/reference/c-struct-client-flags/) (attribute)
- [`client.tty`](/en/tmux/latest/reference/c-struct-client-tty/) (attribute)
- [`client.ttyname`](/en/tmux/latest/reference/c-struct-client-ttyname/) (attribute)
