pty: Index | Files

package pty

import ""

Package pty provides functions for working with Unix terminals.


Package Files

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


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 813 packages. Updated 2017-04-29. Refresh now. Tools for package owners.