From: Charles Hedrick (hedrick@dumas.rutgers.edu)
Date: 02/09/92


From: hedrick@dumas.rutgers.edu (Charles Hedrick)
Subject: fix to select timeouts
Date: 10 Feb 1992 00:15:40 GMT

In order to make ka9q give optimal response without killing all other
activities on the system, I have to use select. (However I'm using it
in a different place than the original KA9Q source had it. Somebody
wasn't being very creative.) Unfortunately, select's timeout feature
doesn't work. The fix is very simple. I'm including the diff here,
though I'm also putting it in athos:/pub/linux/select.patch, just so
it gets onto the distribution systems. (Note that there's another
patch to select also, with the Emacs source code.)

*** select.c.ORIG Mon Jan 13 22:25:24 1992
--- select.c Sun Feb 9 23:36:17 1992
***************
*** 202,207 ****
--- 202,209 ----
                current->state = TASK_INTERRUPTIBLE;
                schedule();
                free_wait(&wait_table);
+ if (! current->timeout)
+ return 0;
                goto repeat;
        }
        free_wait(&wait_table);