use pty/tty terminology similar to github.com/kr/pty
This commit is contained in:
parent
7fdb7564e8
commit
b4df061fef
|
@ -19,8 +19,8 @@ type execHelper struct {
|
|||
logger hclog.Logger
|
||||
|
||||
// newTerminal function creates a tty appropriate for the command
|
||||
// The returned master end of tty function is to be called after process start.
|
||||
newTerminal func() (master func() (*os.File, error), slave *os.File, err error)
|
||||
// The returned pty end of tty function is to be called after process start.
|
||||
newTerminal func() (pty func() (*os.File, error), tty *os.File, err error)
|
||||
|
||||
// setTTY is a callback to configure the command with slave end of the tty of the terminal, when tty is enabled
|
||||
setTTY func(tty *os.File) error
|
||||
|
@ -61,7 +61,7 @@ func (e *execHelper) runTTY(ctx context.Context, stream drivers.ExecTaskStream)
|
|||
|
||||
pty, err := ptyF()
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to get tty master: %v", err)
|
||||
return fmt.Errorf("failed to get pty: %v", err)
|
||||
}
|
||||
|
||||
defer pty.Close()
|
||||
|
|
|
@ -506,7 +506,7 @@ func (l *LibcontainerExecutor) Exec(deadline time.Time, cmd string, args []strin
|
|||
|
||||
}
|
||||
|
||||
func (l *LibcontainerExecutor) newTerminalSocket() (master func() (*os.File, error), socket *os.File, err error) {
|
||||
func (l *LibcontainerExecutor) newTerminalSocket() (pty func() (*os.File, error), tty *os.File, err error) {
|
||||
parent, child, err := lutils.NewSockPair("socket")
|
||||
if err != nil {
|
||||
return nil, nil, fmt.Errorf("failed to create terminal: %v", err)
|
||||
|
|
Loading…
Reference in a new issue