Skip to content

Commit 6caceac

Browse files
authored
fix: MacOS PTY flake when reading after command exists (coder#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.
1 parent ca768e7 commit 6caceac

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

pty/start_other.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ func startPty(cmd *exec.Cmd) (PTY, *os.Process, error) {
1717
if err != nil {
1818
return nil, nil, xerrors.Errorf("open: %w", err)
1919
}
20-
defer func() {
21-
_ = tty.Close()
22-
}()
2320
cmd.SysProcAttr = &syscall.SysProcAttr{
2421
Setsid: true,
2522
Setctty: true,

0 commit comments

Comments
 (0)