# tty_close

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L425
- **Page:** https://libtmux.org/en/tmux/3.2a/reference/c-function-tty_close/

```c
void tty_close(struct tty *tty)
```

## Parameters

- `tty` (`struct tty *`)

## Called by

- [`server_client_dispatch`](/en/tmux/3.2a/reference/c-function-server-client-c-server_client_dispatch/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-client.c#L2069)
- [`tty_free`](/en/tmux/3.2a/reference/c-function-tty_free/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L447)
- [`tty_open`](/en/tmux/3.2a/reference/c-function-tty_open/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L255)

## Calls

- [`tty_keys_free`](/en/tmux/3.2a/reference/c-function-tty_keys_free/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L438)
- [`tty_stop_tty`](/en/tmux/3.2a/reference/c-function-tty_stop_tty/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L429)
- [`tty_term_free`](/en/tmux/3.2a/reference/c-function-tty_term_free/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L437)

## Referenced declarations

- [`tty.event_in`](/en/tmux/3.2a/reference/c-struct-tty-event_in/) (attribute)
- [`tty.event_out`](/en/tmux/3.2a/reference/c-struct-tty-event_out/) (attribute)
- [`tty.flags`](/en/tmux/3.2a/reference/c-struct-tty-flags/) (attribute)
- [`tty.in`](/en/tmux/3.2a/reference/c-struct-tty-in/) (attribute)
- [`tty.key_timer`](/en/tmux/3.2a/reference/c-struct-tty-key_timer/) (attribute)
- [`tty.out`](/en/tmux/3.2a/reference/c-struct-tty-out/) (attribute)
- [`tty.term`](/en/tmux/3.2a/reference/c-struct-tty-term/) (attribute)
- [`tty`](/en/tmux/3.2a/reference/c-struct-tty/) (struct)
- [`TTY_OPENED`](/en/tmux/3.2a/reference/c-define-tmux-h-tty_opened/) (constant)
