RFC, fix for bogus timeouts in select()
Øyvind Harboe
oyvind.harboe@zylin.com
Fri Oct 22 09:02:00 GMT 2004
On Fri, 2004-10-22 at 10:44, Andrew Lunn wrote:
> Hi Oyvind
>
> Did you debug this in detail. I don't see why your fix should help.
> The only thing i could come up with is if selwait.wait() is returning
> 0 when both the condition variable is true and a timeout has
> happened. But looking at the condition variable code i cannot see how
> that would happen.
The patch I wrote is broken.
I see that I've only caused confusion by attempting to formulate a patch
before the issue had been discussed and I properly understood the
select.cxx code. Sorry.
The important thing is to decide whether the current behaviour of
select() is the desired behaviour.
> Can you explain in detail what is happening and why your fix works for
> you?
This is how I discovered the issue:
- non-blocking reads here...
- select() returns a timeout
- read() returns data, even though select() immediately preceding it
returned a timeout.
>
> Thanks
> Andrew
--
Øyvind Harboe
http://www.zylin.com
More information about the Ecos-patches
mailing list