less: implement waiting for input using select(). Rather tricky business.

But we do not read entire input anymore up-front.
This commit is contained in:
Denis Vlasenko 2006-12-24 07:14:17 +00:00
parent 9ac9e55e3c
commit f4dff77355
2 changed files with 523 additions and 461 deletions

File diff suppressed because it is too large Load Diff

View File

@ -12693,7 +12693,7 @@ readcmd(int argc, char **argv)
FD_ZERO (&set);
FD_SET (0, &set);
i = select (FD_SETSIZE, &set, NULL, NULL, &ts);
i = select(FD_SETSIZE, &set, NULL, NULL, &ts);
if (!i) {
#if defined(CONFIG_ASH_READ_NCHARS)
if (nch_flag)