google / google/gvisor

Terminal reporting not working: 'not a tty'

Open
#13,535 3 comments 0 reactions 1 assignee Claimed by @MrEx3cut0r View on GitHub
type: bug
Dominant language
Go
Stars
19.3k
Forks
2k
Avg merge
3d 5h
Merged PRs (30d)
264

Description

### Description

`tty` and `ps` commands fail to detect terminal when run under gVisor.
This is easiest to show with Docker, but if `runsc` is run directly with the `"terminal": true` in the config, it has the same problem.

```
$ docker run --runtime=runsc -it --rm ubuntu tty
not a tty
```
```
$ docker run --runtime=runsc -it --rm ubuntu ps t
PID TTY STAT TIME COMMAND
1 ? Rs 0:00 ps t
```

Compare to the output with the default Docker runtime:

```
$ docker run -it --rm ubuntu tty
/dev/pts/0
```
```
$ docker run -it --rm ubuntu ps t
PID TTY STAT TIME COMMAND
1 pts/0 Rs+ 0:00 ps t
```

### Steps to reproduce

_No response_

### runsc version

```shell
runsc version release-20260608.0
spec: 1.2.1
```

### docker version (if using docker)

```shell

```

### uname

_No response_

### kubectl (if using Kubernetes)

```shell

```

### repo state (if built from source)

_No response_

### runsc debug logs (if available)

```shell

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.