forked from premiere/premiere-libtorrent
handle terminal EOF in client_test
This commit is contained in:
parent
41bc60c36a
commit
2ebe46024b
|
@ -141,7 +141,9 @@ retry:
|
||||||
ret = select(1, &set, 0, 0, &tv);
|
ret = select(1, &set, 0, 0, &tv);
|
||||||
if (ret > 0)
|
if (ret > 0)
|
||||||
{
|
{
|
||||||
*c = getc(stdin);
|
int r = getc(stdin);
|
||||||
|
if (r == EOF) return false;
|
||||||
|
*c = r;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (errno == EINTR)
|
if (errno == EINTR)
|
||||||
|
|
Loading…
Reference in New Issue