diff --git a/pty/start_other.go b/pty/start_other.go index 6709cb271b..a527869e99 100644 --- a/pty/start_other.go +++ b/pty/start_other.go @@ -17,9 +17,6 @@ func startPty(cmd *exec.Cmd) (PTY, *os.Process, error) { if err != nil { return nil, nil, xerrors.Errorf("open: %w", err) } - defer func() { - _ = tty.Close() - }() cmd.SysProcAttr = &syscall.SysProcAttr{ Setsid: true, Setctty: true,