Re: SELECT() returns 1 But FIONREAD says (Input/output error)

From: Bodo Eggert
Date: Fri Jun 01 2007 - 08:19:40 EST


Uncle George <netbeans@xxxxxxxxxxxx> wrote:

> i am using the GARMIN_GPS/usb driver to read a gps receiver.
> In testing the ability of my software to recover from various errors, I
> try this: unplug the gps/USB cable from the usb hub.
>
> Interestingly enough the thread spins.
> the SELECT() waits for something to happen, and I get one channel that
> something interesting happened.

Or, more precisely, that you won't have to wait for an event.

> Needless to day, the code resets the SELECT parameters, and SELECT is
> called again. It again says that something interesting has happened on
> that ( i/o errored ) channel. And we now repeat the  FIONREAD.

That's exactly what select promised you'd get.
--
Today's assembler command: EXOP Execute Operator

Friß, Spammer: huirt@xxxxxxxxxxxxxxxxxxxxxxxxxx t@xxxxxxxxxxxxxxxxxxxxxxxxxx
wV1uda@xxxxxxxxxxxxxxxxxxxxx ycsryPljcb@xxxxxxxxxxxxxxxxxxxxx
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/