ignore ptmx error (#608)

This commit is contained in:
Mike Sawka 2024-04-25 15:35:48 -07:00 committed by GitHub
parent 21d0dd076b
commit fcf8e4ed44
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -197,11 +197,7 @@ func StreamCommandWithExtraFd(ctx context.Context, ecmd *exec.Cmd, outputCh chan
go func() {
// ignore error (/dev/ptmx has read error when process is done)
defer outputWg.Done()
err := utilfn.CopyToChannel(outputCh, cmdPty)
if err != nil {
errStr := fmt.Sprintf("\r\nerror reading from pty: %v\r\n", err)
outputCh <- []byte(errStr)
}
utilfn.CopyToChannel(outputCh, cmdPty)
}()
go func() {
defer outputWg.Done()