[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
RE: moving lutil_detach() in slapd?
> -----Original Message-----
> From: owner-openldap-devel@OpenLDAP.org
> [mailto:owner-openldap-devel@OpenLDAP.org]On Behalf Of Hallvard B Furuseth
> Can I split lutil_detach() in two parts and move all but the chdir()
> to just after slapd_daemon_init() in slapd.c:main.c? That is,
> forking and killing the parent process, connecting standard i/o to
> /dev/null, and detaching from the terminal.
>
> I'm implementing an option to restart slapd (but not re-exec() it) if
> SIGHUP is received, and need the restarting process to detach from the
> terminal at that point.
This statement makes no sense to me. If slapd was running in daemon mode,
then it is already detached. When you receive a SIGHUP and do your restart,
it is still already detached.
-- Howard Chu
Chief Architect, Symas Corp. Director, Highland Sun
http://www.symas.com http://highlandsun.com/hyc
Symas: Premier OpenSource Development and Support