On 16/06/2014, at 4:15 PM, Clemens Lang wrote: > On June 16, 2014 5:57:36 AM CEST, Ian Wadham <[email protected]> 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. _______________________________________________ macports-dev mailing list [email protected] https://lists.macosforge.org/mailman/listinfo/macports-dev
