pty

package
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2018 License: MPL-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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