ui_ti: explicitly define VMIN and VTIME values for read() - sacc - sacc(omys), simple console gopher client
HTML git clone git://bitreich.org/sacc/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/sacc/
DIR Log
DIR Files
DIR Refs
DIR Tags
DIR LICENSE
---
DIR commit c0a79c0424a99180ed4c79e3335dc3f7ced2322c
DIR parent f1432f5a5c56bad44485d9dee8fe92e6d09e1f4c
HTML Author: Hiltjo Posthuma <hiltjo@codemadness.org>
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(-)
---
DIR diff --git a/ui_ti.c b/ui_ti.c
@@ -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);