handle terminal EOF in client_test

This commit is contained in:
Arvid Norberg 2011-03-26 20:53:00 +00:00
parent 41bc60c36a
commit 2ebe46024b
1 changed files with 3 additions and 1 deletions

View File

@ -141,7 +141,9 @@ retry:
ret = select(1, &set, 0, 0, &tv);
if (ret > 0)
{
*c = getc(stdin);
int r = getc(stdin);
if (r == EOF) return false;
*c = r;
return true;
}
if (errno == EINTR)