On 06/19/2012 02:52 PM, Michael Meeks wrote:
It -looks- like you do this on every startup, when in fact we really
only want to do it -before- we run 'exec' in this rather rare re-start
condition :-)
For the given scenario, we really only need to do it *after* exec under
the restart condition on Mac OS X (not *before,* due to additional
threads still running then that must not be irritated by closing fds
they still operate on). So doing it upon *every* start on Mac OS X
appeared to be the easiest fix.
Since max-fx can be quite large, and each syscall takes an appreciable
time most Linux spawn impl's go to the bother of opening /proc/fds,
parsing it and closing up to max-really-open-fd - which tends to be a
much smaller number :-) [ and all of this down to the uber-dumb default
of CLOEXEC that should never have been ].
In practice, max is apparently typically rather small on Mac OS X (like
256 on stock Mac OS X 10.6 and 10.7 machines where I have had a look),
so I see no real need to use a more complex method.
Stephan
_______________________________________________
LibreOffice mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice