Commit c9d033ae authored by Howard Chu's avatar Howard Chu
Browse files

Fix syncrepl slapd_shutdown detection, would not stop on a gentlehup.

parent fc323049
......@@ -83,9 +83,6 @@ static int waking;
do { if (w) tcp_write( wake_sds[1], "0", 1 ); } while(0)
#endif
#ifndef HAVE_WINSOCK
static
#endif
volatile sig_atomic_t slapd_shutdown = 0, slapd_gentle_shutdown = 0;
volatile sig_atomic_t slapd_abrupt_shutdown = 0;
......
......@@ -419,6 +419,7 @@ LDAP_SLAPD_F (void) slapd_set_read LDAP_P((ber_socket_t s, int wake));
LDAP_SLAPD_F (void) slapd_clr_read LDAP_P((ber_socket_t s, int wake));
LDAP_SLAPD_V (volatile sig_atomic_t) slapd_abrupt_shutdown;
LDAP_SLAPD_V (volatile sig_atomic_t) slapd_shutdown;
/*
* dn.c
......
......@@ -450,7 +450,7 @@ do_syncrep2(
BerVarray syncUUIDs = NULL;
ber_tag_t si_tag;
if ( slapd_abrupt_shutdown ) {
if ( slapd_shutdown ) {
rc = -2;
goto done;
}
......@@ -477,7 +477,7 @@ do_syncrep2(
while (( rc = ldap_result( si->si_ld, LDAP_RES_ANY, LDAP_MSG_ONE, tout_p, &res ))
> 0 )
{
if ( slapd_abrupt_shutdown ) {
if ( slapd_shutdown ) {
rc = -2;
goto done;
}
......@@ -797,7 +797,7 @@ do_syncrepl(
return NULL;
}
if ( slapd_abrupt_shutdown && si->si_ld ) {
if ( slapd_shutdown && si->si_ld ) {
ldap_get_option( si->si_ld, LDAP_OPT_DESC, &s );
connection_client_stop( s );
ldap_unbind( si->si_ld );
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment