pty

package
v6.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2019 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package pty provides basic pty support. It implments much of exec.Command but the Start() function starts two goroutines that relay the data for Stdin, Stdout, and Stdout such that proper kernel pty processing is done. We did not simply embed an exec.Command as we can no guarantee that we can implement all aspects of it for all time to come.

Package pty provides basic pty support. It implments much of exec.Command but the Start() function starts two goroutines that relay the data for Stdin, Stdout, and Stdout such that proper kernel pty processing is done. We did not simply embed an exec.Command as we can no guarantee that we can implement all aspects of it for all time to come.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pty

type Pty struct {
	C        *exec.Cmd
	Ptm      *os.File
	Pts      *os.File
	Sname    string
	Kid      int
	TTY      *termios.TTY
	WS       *unix.Winsize
	Restorer *unix.Termios
}

func New

func New() (*Pty, error)

pty support. We used to import github.com/kr/pty but what we need is not that complex. Thanks to keith rarick for these functions.

func (*Pty) Command

func (p *Pty) Command(cmd string, args ...string)

func (*Pty) Run

func (p *Pty) Run() error

func (*Pty) Start

func (p *Pty) Start() error

func (*Pty) Wait

func (p *Pty) Wait() error

Jump to

Keyboard shortcuts

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