Skip to content

Commit

Permalink
fix: MacOS PTY flake when reading after command exists (#410)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kylecarbs committed Mar 8, 2022
1 parent ca768e7 commit 6caceac
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions pty/start_other.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 6caceac

Please sign in to comment.