[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: gentlehup

At 04:28 PM 2002-08-15, Howard Chu wrote:
>> -----Original Message-----
>> From: Kurt D. Zeilenga [mailto:Kurt@OpenLDAP.org]
>> At 01:44 PM 2002-08-14, Howard Chu wrote:
>> >More on soft restarts... Not sure if I already sent this out.
>> >
>> >We can get a seamless restart if we fork/exec a new copy of slapd that
>> >inherits
>> >the currently open listener sockets.
>> Note that forking pthread applications is non-portable...
>This isn't a major issue, all of the listeners are opened long before any
>threads are created.

Any call (including any call which the thread library might
intercept from other libraries) into the thread library is

>We can fork() after opening the listeners and have the
>child process wait in a sigpause() until we want it to do something. It will
>consume practically no resources in the meantime.


Another approach is to fork immediately and then, when needed,
pass the listener/session descriptors to the child over a pipe (or
such).  You can even pass some of the descriptors as their
pending operations complete.  Of course, descriptor passing is
not all that portable either.