Re: launch feedback status update



Havoc Pennington <hp redhat com> writes:

> > > The _NET_LAUNCH_INITIATE message should be sent _before_ launching the
> > > launchee. Also, an XFlush() is needed before launching the launchee.
> >                      ^^^^^^
> > This would be an XSync(), right?
> 
> I'm not sure.

The launchee reads the xid of the window in an environment variable,
so if we don't XSync(), I think there's a race condition:

        launcher creates launch window
        launcher calls XFlush()
        launcher forks off launchee
        launchee reads xid out of environment variable
        launchee sends request involving window
        x sees launchee request, but doesn't know anything about window
        launcher's "create window" finally reaches x server

An XSync() would make sure the "create window" had reached the X
server before the launcher forks.

> > Wouldn't it be possible to have the launchee create a new window,
> > perhaps as a subwindow of the launch window? This new window could

(The subwindow thing is clearly bogus. I don't know why I wrote that).

> > then be used to track when the launchee had finished
> > launching.
> 
> This doesn't get you anywhere that I see, if you already have a ping
> protocol, and it makes the launchee side more complex.

The idea is to use the window as a cheesy crash-indicator. If the
launchee crashed, the window would be destroyed and the
feedback-application would notice and stop the feedback.

This would be more reliable than than pulses or pings. One of these
would still be necessary, though, to handle the situation where the
launchee fails without exiting the process.

The only unhandled situation would then be when a launchee "fails" but
continues to respond to pings. I don't see any way to distinguish this
from a non-failing launchee that is just slow to start or from one
that is broken and doesn't tell anyone when it has started. I think
this should be handled by a timeout on the order of 30 seconds or so.

> > This window could also be used to implement the ping protocol (send
> > pings to this window, send responses to the launcher window).
> 
> Pings could just as easily go on the launch window, though.

Ok, I wasn't sure you could easily do two-way communication through
one window. I must admit that I don't know a whole lot about such
window-manager-ish things.


Søren



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]