mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Fix error handling for select()
Previously the error handling code for select() was unreachable.
This commit is contained in:
parent
76aa8ca727
commit
bfe5c07279
1 changed files with 2 additions and 2 deletions
|
|
@ -72,7 +72,7 @@ void wait_for_tty_device(void)
|
|||
|
||||
/* Block until input becomes available or timeout */
|
||||
status = select(STDIN_FILENO + 1, &rdfs, NULL, NULL, &tv);
|
||||
if (status)
|
||||
if (status > 0)
|
||||
{
|
||||
/* Input from stdin ready */
|
||||
|
||||
|
|
@ -229,7 +229,7 @@ int connect_tty(void)
|
|||
|
||||
/* Block until input becomes available */
|
||||
status = select(maxfd, &rdfs, NULL, NULL, NULL);
|
||||
if (status)
|
||||
if (status > 0)
|
||||
{
|
||||
if (FD_ISSET(fd, &rdfs))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue