<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 11, 2015 at 4:31 PM, René J.V. <span dir="ltr"><<a href="mailto:rjvbertin@gmail.com" target="_blank">rjvbertin@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Wednesday February 11 2015 16:02:49 Jeremy Whiting wrote:<br>
<br>
Hi Jeremy,<br>
<br>
</span>CC'ing this to macports-dev as there may be someone there who can give some background and a proper solution.<br>
<span class=""><br>
> In Console.app I see this error:<br>
> 2/11/15 3:53:53.155 PM kdeinit5: klauncher --fd=8[60704]: Process 60703 was<br>
> forked to 60704 without calling exec(). This is not supported by<br>
> FileManager. Aborting.<br>
><br>
> There's a method in kinit.cpp mac_fork_and_reexec_self with an explanation<br>
> saying we can't fork on OS X without also doing exec. Is this needed in<br>
> kinit's launch function also so when it launches klauncher OS X doesn't<br>
> kill it imediately?<br>
<br>
</span>I've googled this (USING_FORK_WITHOUT_EXEC_IS_NOT_SUPPORTED_BY_FILE_MANAGER) a bit, and came across this (<a href="https://trac.adium.im/ticket/13976#comment:28" target="_blank">https://trac.adium.im/ticket/13976#comment:28</a>):<br>
"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"<br>
<br>
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.<br>
<br>
Do you know how the crashing klauncher was started, via launchctl?<br></blockquote><div><br></div><div>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.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Indeed, it would seem that it would be a good idea either to<br>
- not use fork(), exec() to spawn a new process, but use one of the OS X specific methods<br>
- 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.<br></blockquote><div> </div><div>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.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I'd guess that QProcess must also have an indication how one can "safely" launch a new process on OS X.<br>
<br>
R.<br>
_______________________________________________<br>
macports-dev mailing list<br>
<a href="mailto:macports-dev@lists.macosforge.org">macports-dev@lists.macosforge.org</a><br>
<a href="https://lists.macosforge.org/mailman/listinfo/macports-dev" target="_blank">https://lists.macosforge.org/mailman/listinfo/macports-dev</a><br>
</blockquote></div><br></div></div>