# tty_open

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

```c
int tty_open(struct tty *tty, char **cause)
```

## Parameters

- `tty` (`struct tty *`)
- `cause` (`char **`)

## Called by

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

## Calls

- [`fatal`](/en/tmux/3.2a/reference/c-function-fatal/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L266)
- [`tty_close`](/en/tmux/3.2a/reference/c-function-tty_close/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L255)
- [`tty_keys_build`](/en/tmux/3.2a/reference/c-function-tty_keys_build/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L277)
- [`tty_start_tty`](/en/tmux/3.2a/reference/c-function-tty_start_tty/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L275)
- [`tty_term_create`](/en/tmux/3.2a/reference/c-function-tty_term_create/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L252)

## Other function references

- [`tty_read_callback`](/en/tmux/3.2a/reference/c-function-tty-c-tty_read_callback/) (function)
- [`tty_timer_callback`](/en/tmux/3.2a/reference/c-function-tty-c-tty_timer_callback/) (function)
- [`tty_write_callback`](/en/tmux/3.2a/reference/c-function-tty-c-tty_write_callback/) (function)

## Referenced declarations

- [`tty.client`](/en/tmux/3.2a/reference/c-struct-tty-client/) (attribute)
- [`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)
- [`client.fd`](/en/tmux/3.2a/reference/c-struct-client-fd/) (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.out`](/en/tmux/3.2a/reference/c-struct-tty-out/) (attribute)
- [`tty.term`](/en/tmux/3.2a/reference/c-struct-tty-term/) (attribute)
- [`client.term_caps`](/en/tmux/3.2a/reference/c-struct-client-term_caps/) (attribute)
- [`client.term_features`](/en/tmux/3.2a/reference/c-struct-client-term_features/) (attribute)
- [`client.term_name`](/en/tmux/3.2a/reference/c-struct-client-term_name/) (attribute)
- [`client.term_ncaps`](/en/tmux/3.2a/reference/c-struct-client-term_ncaps/) (attribute)
- [`tty.timer`](/en/tmux/3.2a/reference/c-struct-tty-timer/) (attribute)
- [`tty`](/en/tmux/3.2a/reference/c-struct-tty/) (struct)
- [`TTY_BLOCK`](/en/tmux/3.2a/reference/c-define-tmux-h-tty_block/) (constant)
- [`TTY_FREEZE`](/en/tmux/3.2a/reference/c-define-tmux-h-tty_freeze/) (constant)
- [`TTY_NOCURSOR`](/en/tmux/3.2a/reference/c-define-tmux-h-tty_nocursor/) (constant)
- [`TTY_OPENED`](/en/tmux/3.2a/reference/c-define-tmux-h-tty_opened/) (constant)
- [`TTY_TIMER`](/en/tmux/3.2a/reference/c-define-tmux-h-tty_timer/) (constant)
