Re: The meaning(s) of $DISPLAY (was Re: Explanation of X implementations)
Re: The meaning(s) of $DISPLAY (was Re: Explanation of X implementations)
- Subject: Re: The meaning(s) of $DISPLAY (was Re: Explanation of X implementations)
- From: Derek Fawcus <email@hidden>
- Date: Sun, 18 Nov 2007 23:56:16 +0000
Well I consider the redefined contents of DISPLAY to be rather an ugly hack.
It should be possible for launchd to listen on the normal :0.0 (/tmp/.X11-unix/:0)
for a connection, then when that socket can accept without blocking, spawn an
xserver and pass the listening socket to it. Launchd never calling accept on
the socket. Then if/when the xserver dies, launchd goes back to waiting for
the listening socket to be able to accept without blocking.
An alternate would be for launchd to do the first accept and pass the listen and
accepted sockets to the spawned Xserver, closing the accepted socket after the
fork and keeping the listening socket open. The Xserver then accepts for new
connections, and deals with the initial triggering connection.
The first scheme seems as if it may be easier to hack in to the xserver xtransport
stuff, as the server would have a chance to do its xinit stuff before it called
accept (i.e. it acts as if it was started before the first connections occurred).
(OK - I've never tried passing a listening socket fd, but is _should_ work :-)
DF
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden