libc lwip recv MSG_PEEK doesn't behave as specified

Christian Helmuth christian.helmuth at genode-labs.com
Wed Jun 20 11:18:50 CEST 2018


Hello,

On Wed, Jun 20, 2018 at 11:03:21AM +0200, Johannes Kliemann wrote:
> > Please have a look into the test residing in libports/src/test/libc_component.
> 
> That looks indeed close to what I want to have. What is not clear to me
> why _select_ready is registered as handler but then still called
> manually after Select_handler::select returns.
> 
> Sorry for being nitpicky, I just want to get a better understanding
> about this (my understanding of the whole Libc interface also could be
> better so this is a starting point).

No problem. It is registered as handler function for the case the
entrypoint was blocked when the fd becomes readable. But, (like in
POSIX) Select_handler::select() may also return immediately with
readable fds, which should also be handled immediately. I remember
distantly that otherwise a deblocked fd ended up unhandled in some
edge cases.

Greets
-- 
Christian Helmuth
Genode Labs

https://www.genode-labs.com/ · https://genode.org/
https://twitter.com/GenodeLabs · /ˈdʒiː.nəʊd/

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth



More information about the users mailing list