Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunCommand ¶
func RunCommand(g *goroutine.Goroutine, conn FlushReadWriter, pty, tty io.ReadWriter, cmd *exec.Cmd, logger log.DebugLogger) error
RunCommand will run a command inside a pseudo-terminal session. Data are copied between the connection and the PTY master. If g is not nil, the process is started from within the specified Goroutine.
Types ¶
type FlushReadWriter ¶
type FlushReadWriter interface {
Flush() error
io.ReadWriter
}
type NamedReadWriteCloser ¶
type NamedReadWriteCloser interface {
Name() string
io.ReadWriteCloser
}
func OpenPty ¶
func OpenPty() (pty, tty NamedReadWriteCloser, err error)
OpenPty will open a pseudo-terminal pair, returning each side of the pair, the name of the TTY side or an error.
Click to show internal directories.
Click to hide internal directories.