Clear pollin flag when input buffer is flushed
The pollin flag must be cleared when the input buffer (pty slave) is flushed. This ensures that the POLLIN event is not signaled to the application, when there is not data to read.
This commit is contained in:
@@ -918,6 +918,7 @@ ttynvt_ioctl(fuse_req_t req, int cmd, void *arg,
|
|||||||
case TCIFLUSH:
|
case TCIFLUSH:
|
||||||
byte = 1;
|
byte = 1;
|
||||||
tty->slave_suspended = 0; /* Re-enable polling of Slave */
|
tty->slave_suspended = 0; /* Re-enable polling of Slave */
|
||||||
|
tty->pollin = 0;
|
||||||
break;
|
break;
|
||||||
case TCOFLUSH:
|
case TCOFLUSH:
|
||||||
byte = 2;
|
byte = 2;
|
||||||
@@ -927,6 +928,7 @@ ttynvt_ioctl(fuse_req_t req, int cmd, void *arg,
|
|||||||
byte = 3;
|
byte = 3;
|
||||||
tty->slave_suspended = 0; /* Re-enable polling of Slave */
|
tty->slave_suspended = 0; /* Re-enable polling of Slave */
|
||||||
tty->pollout = 1;
|
tty->pollout = 1;
|
||||||
|
tty->pollin = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
telnet_rfc2217_cfg(tty->tn, TNS_SET_PURGE, &byte, 1);
|
telnet_rfc2217_cfg(tty->tn, TNS_SET_PURGE, &byte, 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user