mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
[pty] Return enqueued data and then EIO if the replica is closed
PiperOrigin-RevId: 532496868
This commit is contained in:
@@ -110,6 +110,9 @@ func (q *queue) read(ctx context.Context, dst usermem.IOSequence, l *lineDiscipl
|
||||
defer q.mu.Unlock()
|
||||
|
||||
if !q.readable {
|
||||
if l.numReplicas == 0 {
|
||||
return 0, false, false, linuxerr.EIO
|
||||
}
|
||||
return 0, false, false, linuxerr.ErrWouldBlock
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user