pty

package
v0.1.20 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2018 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const Supported = true

Supported is true, if PTY is supported on the given platform

Variables

This section is empty.

Functions

This section is empty.

Types

type PTY

type PTY struct {
	// contains filtered or unexported fields
}

PTY holds the pseduo-tty that an exec.Cmd is running in.

func Start

func Start(cmd *exec.Cmd) (*PTY, error)

Start will create start cmd and return a PTY wrapping it. The PTY implements ReadWriteCloser and must be closed when execution is done.

Note: This will overwrite stdio for cmd.

func (*PTY) Close

func (pty *PTY) Close() error

Close will close the PTY

func (*PTY) Read

func (pty *PTY) Read(p []byte) (n int, err error)

func (*PTY) SetSize

func (pty *PTY) SetSize(cols, rows uint16) error

SetSize will set the TTY size, returns engines.ErrFeatureNotSupported on unsupported platforms.

func (*PTY) Write

func (pty *PTY) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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