Why do I require a `wl_event_loop_add_idle` in creating a fork-exec wayland client
sichem.zh at gmail.com
Thu Jul 12 01:42:24 UTC 2018
I have a question related to the wl_client creation in the compositor. I
followed these step like weston did:
1. create socketpair.
2. fork a process and close `socket` in child, close `socket` in in
3. set the `WAYLAND_SOCKET` to `socket`.
4. exec the program.
I found out if I do this directly both compositor and client will stuck in
the eventloop. It seems the compositor is stuck in the
`wl_display_flush_clients` and client is stuck in `wl_event_queue_dispatch`
and internally stuck in the epoll. So I think both compositor and client
were waiting each other for some update.
Then I found out that I need to pack the code in a
`wl_event_loop_idle_func_t` and add it to the event_loop. But I am couldn't
figure out why did the compositor stuck in the first place and why did the
Thanks very much.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the wayland-devel