Help us shape the future of Go! Take the 2026 Go Developer Survey

pty

package
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package pty provides a minimal pseudo-terminal implementation built directly on Linux ioctls via golang.org/x/sys/unix, with zero new dependencies (creack/pty is intentionally NOT used — it is not vendored).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open() (master, slave *os.File, err error)

Open allocates a new pseudo-terminal pair and returns the master (ptmx) and the slave (pts) as *os.File. The caller wires the slave to a child process's stdin/stdout/stderr and reads/writes the master.

func Setsize

func Setsize(master *os.File, rows, cols uint16) error

Setsize sets the window size of the pty referenced by the master file.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL