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.

-- 
[email protected]  <><, Pseudo Engineer, itinerant idiot

_______________________________________________
LibreOffice mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to