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



On Tue, 2012-06-19 at 15:43 +0200, Stephan Bergmann wrote:
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.

        Grief - but calling 'exec' is unlikely to leave the threads around of
the previous process in some unharmed state - surely it will just
terminate them all [ presumably that is what we want ;-].

        If not, a quick:

        if (!fork()) {
                // close all sockets
                exec (...);
        }

        Would presumably do what we want (?) :-) Hopefully we're not counting
on some configuration writer thread to write the config :-)

        Anyhow, if the fd limit is 256 it's hardly going to be a big hit
anyway, so no real problem.

        Thanks,

                Michael.

-- 
michael.meeks@suse.com  <><, Pseudo Engineer, itinerant idiot


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.