Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


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

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.