Fixing KDE debug dialog and Dr Konqui to run on OS X
Ian Wadham
iandw.au at gmail.com
Thu Jun 19 21:57:16 PDT 2014
On 16/06/2014, at 4:15 PM, Clemens Lang wrote:
> On June 16, 2014 5:57:36 AM CEST, Ian Wadham <iandw.au at gmail.com> wrote:
>> On 16/06/2014, at 1:38 PM, Brandon Allbery wrote:
>>> The normal time you need such code is after a fork() and before
>> exec() to avoid leaking file descriptors to a child that won't know
>> they're even there.
>>
>> Something like that happens in later KDE crash-processing code, which
>> starts Dr Konqi (the crash-processing dialog app), but I have not
>> looked at
>> it in detail yet. It first tries to get a third party (kdeinit) to
>> start Dr Konqi.
>> This is preferred (the comments say) because it avoids inheriting
>> possibly
>> corrupted data. But if that fails, it forks and starts Dr Konqi as a
>> child.
>
> If you need the file descriptors closed after the fork you can set the close on exec flag instead of closing them. I hear that won't bother libdispatch.
Thanks again, Clemens. I'll keep that in mind for further down the track.
Cheers, Ian W.
More information about the macports-dev
mailing list