pty: github.com/kr/pty Index | Files

package pty

import "github.com/kr/pty"

Package pty provides functions for working with Unix terminals.

Index

Package Files

doc.go ioctl.go pty_linux.go run.go util.go ztypes_amd64.go

Variables

var ErrUnsupported = errors.New("unsupported")

ErrUnsupported is returned if a function is not available on the current platform.

func Getsize Uses

func Getsize(t *os.File) (rows, cols int, err error)

Getsize returns the number of rows (lines) and cols (positions in each line) in terminal t.

func Open Uses

func Open() (pty, tty *os.File, err error)

Opens a pty and its corresponding tty.

func Start Uses

func Start(c *exec.Cmd) (pty *os.File, err error)

Start assigns a pseudo-terminal tty os.File to c.Stdin, c.Stdout, and c.Stderr, calls c.Start, and returns the File of the tty's corresponding pty.

Package pty imports 6 packages (graph) and is imported by 444 packages. Updated 2016-08-26. Refresh now. Tools for package owners.