Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Joe Martin
OpenLDAP
Commits
b1c098ad
Commit
b1c098ad
authored
Mar 20, 2018
by
Ondřej Kuzník
Browse files
Module shutdown support
parent
05d6aae4
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/lloadd/daemon.c
View file @
b1c098ad
...
...
@@ -787,6 +787,10 @@ lloadd_daemon_destroy( void )
event_base_free
(
lload_daemon
[
i
].
base
);
}
}
event_base_free
(
daemon_base
);
daemon_base
=
NULL
;
lloadd_inited
=
0
;
#ifdef HAVE_TCPD
ldap_pvt_thread_mutex_destroy
(
&
sd_tcpd_mutex
);
...
...
@@ -1359,9 +1363,11 @@ lloadd_daemon( struct event_base *daemon_base )
/* wait for the listener threads to complete */
destroy_listeners
();
for
(
i
=
0
;
i
<
lload_daemon_threads
;
i
++
)
ldap_pvt_thread_join
(
daemon_tid
[
i
],
(
void
*
)
NULL
);
for
(
i
=
0
;
i
<
lload_daemon_threads
;
i
++
)
{
event_del
(
lload_daemon
[
i
].
wakeup_event
);
}
#ifndef BALANCER_MODULE
if
(
LogTest
(
LDAP_DEBUG_ANY
)
)
{
int
t
=
ldap_pvt_thread_pool_backload
(
&
connection_pool
);
Debug
(
LDAP_DEBUG_ANY
,
"lloadd shutdown: "
...
...
@@ -1369,16 +1375,26 @@ lloadd_daemon( struct event_base *daemon_base )
t
);
}
ldap_pvt_thread_pool_close
(
&
connection_pool
,
1
);
#endif
lload_backends_destroy
();
clients_destroy
();
lload_bindconf_free
(
&
bindconf
);
evdns_base_free
(
dnsbase
,
0
);
for
(
i
=
0
;
i
<
lload_daemon_threads
;
i
++
)
{
ldap_pvt_thread_join
(
daemon_tid
[
i
],
(
void
*
)
NULL
);
}
ch_free
(
daemon_tid
);
daemon_tid
=
NULL
;
lloadd_daemon_destroy
();
/* If we're a slapd module, let the thread that initiated the shut down
* know we've finished */
ldap_pvt_thread_cond_signal
(
&
lload_wait_cond
);
return
0
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment