[KDE/Mac] Potential blocker in kdeinit5 and klauncher5 on OS X

Ian Wadham iandw.au at gmail.com
Sun Feb 8 04:12:11 UTC 2015


Hello David,

On 08/02/2015, at 2:10 AM, David Faure wrote:
> On Saturday 07 February 2015 08:03:11 Ian Wadham wrote:
>> On 07/02/2015, at 1:09 AM, Jeremy Whiting wrote:
>>> Ok with your patch applied and those debug messages added I do see
>>> Requested klauncher to start, but I don't ever see KLauncher replied OK.
>>> I do after a bit see "Communication error with launcher, Exiting! as
>>> before. If I find some time today I'll dig into why this is happening,
>>> we'll see.
>> Looks like my patch in klauncher.cpp is not using the socket correctly.
>> 
>> If I overlooked anything obvious, please let me know.  Otherwise, it's
>> back to the drawing-board for me… :-)
> 
> If you don't use the socket for sending commands, why not just ifdef it out 
> and not use the socket at all ?

I am not sure what you mean here.  If the socket is not enabled (partially) in
klauncher5, the code will not reply to kdeinit5 on OSX, so kdeinit5 will block
and will not start kded5 (if requested) and maybe not other things.

I think that is a rather serious problem, don't you?  It seems to have been
responsible in the past for several broken KDE 4 apps on OS X.

If you are suggesting something like:

   if (launch_klauncher) {
       start_klauncher();
#ifndef Q_OS_MAC
       handle_requests(d.launcher_pid); // Wait for klauncher to be ready
#endif
   }

that would be a kludge where I come from [1], and potentially a source of
obscure problems in KF5 apps running on OSX.

In any case, I would assume that "// Wait for klauncher to be ready" is there
for a reason and the original author knew that, but unfortunately did not
reveal it.  So how can we judge if that reason is valid today or not?

That said, if Jeremy wishes to disable "handle_requests(d.launcher_pid)"
to facilitate further tests he is doing, fine by me, but I would not like to see
that fix get committed to Frameworks without further thought.  Would you?

All the best, Ian W.

[1]
I am more used to code like:

    start_conveyor();
    wait_for_conveyor_running();
    start_coal_digger();
    ...

Without the "wait_for", if the conveyor fails to start, the coal digger could
dump tonnes of coal on the ground and somebody then has to go out and
remove it with a shovel, ideally a mechanical one… :-)



More information about the kde-mac mailing list