---
name: "TIOCTTYGSTRUCT"
section: "2const"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/TIOCTTYGSTRUCT"
---

# TIOCTTYGSTRUCT(2const)

kernel debugging

## NAME

TIOCTTYGSTRUCT - kernel debugging

## LIBRARY

Standard C library (*libc*, *-lc*)

## SYNOPSIS

```
#include <sys/ioctl.h>
```

**int ioctl(int** *fd***, TIOCTTYGSTRUCT, struct tty\_struct \****argp***);**

**#include \<linux/tty.h\>**

**struct tty\_struct;**

## DESCRIPTION

Get the *tty\_struct* corresponding to *fd*.

## RETURN VALUE

On success, 0 is returned. On error, -1 is returned, and *errno* is set to indicate the error.

## HISTORY

This operation was removed in Linux 2.5.67.

## SEE ALSO

[**ioctl**(2)](/ioctl/2.md), [**ioctl\_tty**(2)](/ioctl_tty/2.md)
