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

Joshua Root jmr at macports.org
Wed Feb 11 16:28:15 PST 2015


On 2015-2-12 10:31 , René J.V. Bertin 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.

I don't think that's correct. Rather, you're not allowed to use many
APIs after you fork() unless you also immediately exec().

Even if you don't deliberately do anything between the fork and exec,
it's possible for things to happen because of signals and the like. This
is one reason why Apple recommends using posix_spawn.

- Josh


More information about the macports-dev mailing list