mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Fix EOFs when reading from empty canon->noncanon PTY
when switching from canonical to non-canonical mode, only mark inQueue as readable if there is input to be read
This commit is contained in:
@@ -154,7 +154,7 @@ func (l *lineDiscipline) setTermios(task *kernel.Task, args arch.SyscallArgument
|
||||
if oldCanonEnabled && !l.termios.LEnabled(linux.ICANON) {
|
||||
l.inQueue.mu.Lock()
|
||||
l.inQueue.pushWaitBufLocked(l)
|
||||
l.inQueue.readable = true
|
||||
l.inQueue.readable = len(l.inQueue.readBuf) > 0
|
||||
l.inQueue.mu.Unlock()
|
||||
l.termiosMu.Unlock()
|
||||
l.replicaWaiter.Notify(waiter.ReadableEvents)
|
||||
|
||||
Reference in New Issue
Block a user