| Date: Wed, 19 Aug 2020 22:57:57 +0200
ui_ti: explicitly define VMIN and VTIME values for read()
VMIN represents the minimum number of bytes that should be received when the
read(2) function successfully returns.
VTIME is a timer of 0.1 second granularity that is used to time out bursty and
short term data transmissions.
On some systems VMIN is not 1 causing input processing issues.
Diffstat:
M ui_ti.c | 2 ++
1 file changed, 2 insertions(+), 0 deletions(-)
--- |
| @@ -24,6 +24,8 @@ uisetup(void)
tcgetattr(0, &tsave);
tsacc = tsave;
tsacc.c_lflag &= ~(ECHO|ICANON);
+ tsacc.c_cc[VMIN] = 1;
+ tsacc.c_cc[VTIME] = 0;
tcsetattr(0, TCSANOW, &tsacc);
setupterm(NULL, 1, NULL); |