# server_client_open

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-client.c#L243
- **Page:** https://libtmux.org/en/tmux/3.2a/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/3.2a/reference/c-function-cmd_attach_session/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-attach-session.c#L139)
- [`cmd_new_session_exec`](/en/tmux/3.2a/reference/c-function-cmd-new-session-c-cmd_new_session_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-new-session.c#L185)

## Calls

- [`tty_open`](/en/tmux/3.2a/reference/c-function-tty_open/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-client.c#L269)
- [`xasprintf`](/en/tmux/3.2a/reference/c-function-xasprintf/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-client.c#L260)
- [`xstrdup`](/en/tmux/3.2a/reference/c-function-xstrdup/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-client.c#L265)

## Referenced declarations

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