[PATCH 0/3] libxtrans + xserver: Add support for systemd socket activation (v5)

Hans de Goede hdegoede at redhat.com
Tue Dec 3 01:48:03 PST 2013


Hi,

On 12/02/2013 09:54 PM, Kristian Høgsberg wrote:
> On Mon, Dec 2, 2013 at 11:44 AM, Hans de Goede <hdegoede at redhat.com> wrote:
>> Hi All,
>
> Hi,
>
> I didn't follow all this in detail, but I'm not sure that we need
> Xtrans patches at all.  The server already has ListenOnOpenFD() in
> os/connection.c.  It was added for launchd under OSX, but we use it
> for xwayland socket activation too.

Looking at how this is used, it is used for fds which are received through
messages send over another fd while the Xserver is running.

Where as the systemd sockets are passed in as already open fds on startup
(just like stdout & friends are already open on startup).

Note that libxtrans has code for OSX for getting sockets passed at startup
to, see this bit in XTrans.c:

#ifdef XQUARTZ_EXPORTS_LAUNCHD_FD
     fprintf(stderr, "Launchd socket fd: %d\n", xquartz_launchd_fd);
     if(xquartz_launchd_fd != -1) {
         if((ciptr = TRANS(ReopenCOTSServer(TRANS_SOCKET_LOCAL_INDEX,
                                            xquartz_launchd_fd, getenv("DISPLAY"
             fprintf(stderr,"Got NULL while trying to Reopen launchd port\n");
         else
             temp_ciptrs[(*count_ret)++] = ciptr;
     }
#endif

Regards,

Hans


More information about the xorg-devel mailing list