# server_client_exec

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-client.c#L447
- **Page:** https://libtmux.org/en/tmux/3.2a/reference/c-function-server_client_exec/

```c
void server_client_exec(struct client *c, const char *cmd)
```

## Parameters

- `c` (`struct client *`)
- `cmd` (`const char *`)

## Called by

- [`cmd_detach_client_exec`](/en/tmux/3.2a/reference/c-function-cmd-detach-client-c-cmd_detach_client_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-detach-client.c#L84)

## Calls

- [`checkshell`](/en/tmux/3.2a/reference/c-function-checkshell/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-client.c#L462)
- [`options_get_string`](/en/tmux/3.2a/reference/c-function-options_get_string/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-client.c#L459)
- [`proc_send`](/en/tmux/3.2a/reference/c-function-proc_send/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-client.c#L470)
- [`xmalloc`](/en/tmux/3.2a/reference/c-function-xmalloc/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-client.c#L466)

## Referenced by

- [`server_client_detach`](/en/tmux/3.2a/reference/c-function-server_client_detach/) (function)

## Referenced declarations

- [`_PATH_BSHELL`](/en/tmux/3.2a/reference/c-define-compat-h-_path_bshell/) (constant)
- [`client`](/en/tmux/3.2a/reference/c-struct-client/) (struct)
- [`global_s_options`](/en/tmux/3.2a/reference/c-variable-global_s_options/) (attribute)
- [`MSG_EXEC`](/en/tmux/3.2a/reference/c-enum-msgtype-msg_exec/) (constant)
- [`session.options`](/en/tmux/3.2a/reference/c-struct-session-options/) (attribute)
- [`client.peer`](/en/tmux/3.2a/reference/c-struct-client-peer/) (attribute)
- [`client.session`](/en/tmux/3.2a/reference/c-struct-client-session/) (attribute)
