The entrypoint creates the root component, spawns the thread and returns. It will then handle RPC requests, as entrypoints do IIRC.
The program acts as a server (serving Nic sessions asynchronously) and as a client to lxip vfs with libc. the code can be found in [1].
How can I have the entrypoint handle I/O signals in libc while also being able to serve clients in Genode?
[1] https://github.com/genodelabs/genode/blob/master/repos/ports/src/app/openvpn...
On 23-06-17 15:28, Christian Helmuth wrote:
Hey,
On Fri, Jun 23, 2017 at 03:21:28PM +0200, Boris Mulder wrote:
Basically if I do not use with_libc, the call to socket() will hang forever inside the first read() call to the socket file.
So, which code does your initial entrypoint execute? As I wrote before, the initial entrypoint is responsible for completing the I/O operations in Libc components. In other words, if the initial entrypoint does not block and then handle libc I/O signals, other threads blocked in the libc will never resume.
The reason I used a Genode::Thread was because openvpn already did that. Do you think using a pthread might be better in this case?
No, I was just curios ;-)
Grets