mirror of https://github.com/coder/coder.git
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:
parent
ca768e7e83
commit
6caceacfb4
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue