Module init ordering (Re: [PATCH weston] man: weston --xserver has been replaced)
ppaalanen at gmail.com
Thu Sep 13 04:06:45 PDT 2012
On Thu, 13 Sep 2012 13:46:27 +0300
Pekka Paalanen <ppaalanen at gmail.com> wrote:
> The generic module loading must be used now to load xserver.so.
> Option --xserver was removed by
related to the above-mentioned change, the module loading order is no
longer constant. In the usual case for XWayland:
[13:50:00.585] Loading module '/home/pq/local/lib/weston/desktop-shell.so'
[13:50:00.586] launching '/home/pq/local/libexec/weston-desktop-shell'
[13:50:00.587] Loading module '/home/pq/local/lib/weston/xwayland.so'
[13:50:00.588] xserver listening on display :1
[13:50:00.588] libwayland: using socket /home/pq/local/tmp/wayland-0
That shows that weston-desktop-shell is forked before xwayland is
loaded, and hence no Wayland client started through the shell will have
DISPLAY set. This is obvious if you launch weston-terminal from the
panel launcher button, and try to start xterm from it.
There might also be another issue, a real race that has existed for a
long time. If the just-forked weston-desktop-shell happens to run
before weston gets to "libwayland: using socket ..." part, will it fail
to connect to the server and die?
Should we perhaps have a two-stage module init?
1. module init only
2. server is up and environment set, can launch clients now
More information about the wayland-devel