taskcluster-worker: github.com/taskcluster/taskcluster-worker/plugins/interactive/pty Index | Files

package pty

import "github.com/taskcluster/taskcluster-worker/plugins/interactive/pty"

Index

Package Files

pty_unix.go

Constants

const Supported = true

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

type PTY Uses

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

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

func Start Uses

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 Uses

func (pty *PTY) Close() error

Close will close the PTY

func (*PTY) Read Uses

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

func (*PTY) SetSize Uses

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

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

func (*PTY) Write Uses

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

Package pty imports 5 packages (graph) and is imported by 2 packages. Updated 2017-03-18. Refresh now. Tools for package owners.