()
| 175 | } |
| 176 | |
| 177 | func (p *otherProcess) waitInternal() { |
| 178 | // The GC can garbage collect the TTY FD before the command |
| 179 | // has finished running. See: |
| 180 | // https://github.com/creack/pty/issues/127#issuecomment-932764012 |
| 181 | p.cmdErr = p.cmd.Wait() |
| 182 | runtime.KeepAlive(p.pty) |
| 183 | close(p.cmdDone) |
| 184 | } |
| 185 | |
| 186 | // ptmReader wraps a reference to the ptm side of a pseudo-TTY for portability |
| 187 | type ptmReader struct { |