diff --git a/drivers/shared/executor/exec_utils.go b/drivers/shared/executor/exec_utils.go index 17194d0db..ed3dd2ba8 100644 --- a/drivers/shared/executor/exec_utils.go +++ b/drivers/shared/executor/exec_utils.go @@ -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() diff --git a/drivers/shared/executor/executor_linux.go b/drivers/shared/executor/executor_linux.go index 33900f876..f1a465c16 100644 --- a/drivers/shared/executor/executor_linux.go +++ b/drivers/shared/executor/executor_linux.go @@ -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)