fix: MacOS PTY flake when reading after command exists (#410)

The TTY wasn't bufferring properly because the FD was closed.
I did this initially to clone how creack/pty handles it, but it's
unnecessary because we get the entire PTY back to close.
This commit is contained in:
Kyle Carberry 2022-03-08 09:49:09 -06:00 committed by GitHub
parent ca768e7e83
commit 6caceacfb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 3 deletions

View File

@ -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,