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

René J.V. Bertin rjvbertin at gmail.com
Wed Feb 11 23:31:16 UTC 2015


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?

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.

I'd guess that QProcess must also have an indication how one can "safely" launch a new process on OS X.

R.


More information about the kde-mac mailing list