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.TTYIO WS *termios.Winsize Restorer *termios.Termios }
Pty contains all the bits and pieces needed to start and control a process at the other end of a pty, as well as whatever is needed to control the pty, and restore modes on exit.
func (*Pty) Run ¶
Run runs a Command attached to a Pty, waiting for completion and managing stdio. It uses Wait to restore tty modes when it is done.