[KDE/Mac] Cross-platform with kdeinit5, klauncher5, kded5 and friends

Jeremy Whiting jpwhiting at kde.org
Wed Feb 11 15:31:34 PST 2015


On Wed, Feb 11, 2015 at 4:31 PM, René J.V. <rjvbertin at gmail.com> wrote:

> On Wednesday February 11 2015 16:02:49 Jeremy Whiting wrote:
>
> Hi Jeremy,
>
> CC'ing this to macports-dev as there may be someone there who can give
> some background and a proper solution.
>
> > In Console.app I see this error:
> > 2/11/15 3:53:53.155 PM kdeinit5: klauncher --fd=8[60704]: Process 60703
> was
> > forked to 60704 without calling exec(). This is not supported by
> > FileManager. Aborting.
> >
> > There's a method in kinit.cpp mac_fork_and_reexec_self with an
> explanation
> > saying we can't fork on OS X without also doing exec. Is this needed in
> > kinit's launch function also so when it launches klauncher OS X doesn't
> > kill it imediately?
>
> I've googled this
> (USING_FORK_WITHOUT_EXEC_IS_NOT_SUPPORTED_BY_FILE_MANAGER) a bit, and came
> across this (https://trac.adium.im/ticket/13976#comment:28):
> "The problem is that OSX since version 10.6 (Snow Leopard) does NOT allow
> processes launched via Dock (not via exec) to use fork() function"
>
> I take that to mean that doing fork() doesn't oblige you to do an exec()
> afterwards, it's that you cannot do a fork() from a process that's not been
> started through exec.
>
> Do you know how the crashing klauncher was started, via launchctl?
>

klauncher was launched by kinit in kinit.cpp's launch function which does
fork(). I started kdeinit5 by running
/Applications/KDE/kdeinit5.app/Contents/MacOS/kdeinit5 --kded in the
terminal.


>
> Indeed, it would seem that it would be a good idea either to
> - not use fork(), exec() to spawn a new process, but use one of the OS X
> specific methods
> - have a look at port:kdelibs4 to see how the issue was solved there,
> because KDE4 apps can clearly be launched through the Finder (and thus the
> Dock) without being killed.
>

Yep, I'm trying to figure out how to get kdeinit5 working. Launching
applications like kanagram and such from the Finder is working fine
currently. I'll take a look at kdelibs4 though, good idea.


> I'd guess that QProcess must also have an indication how one can "safely"
> launch a new process on OS X.
>
> R.
> _______________________________________________
> macports-dev mailing list
> macports-dev at lists.macosforge.org
> https://lists.macosforge.org/mailman/listinfo/macports-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-dev/attachments/20150211/bf400823/attachment.html>


More information about the macports-dev mailing list