static ldap_pvt_thread_t listener_tid;
static volatile sig_atomic_t slapd_shutdown = 0;
+static volatile sig_atomic_t slapd_listener = 0;
struct slap_daemon {
ldap_pvt_thread_mutex_t sd_mutex;
int tcps = ((int *)ptr) [1];
free( ptr );
+ slapd_listener=1;
+
connections_init();
ldap_pvt_thread_mutex_init( &slap_daemon.sd_mutex );
}
ldap_pvt_thread_mutex_unlock( &active_threads_mutex );
+ slapd_listener = 0;
return NULL;
}
slap_set_shutdown( int sig )
{
slapd_shutdown = sig;
- ldap_pvt_thread_kill( listener_tid, LDAP_SIGUSR1 );
+
+ if(slapd_listener) {
+ ldap_pvt_thread_kill( listener_tid, LDAP_SIGUSR1 );
+ }
/* reinstall self */
(void) SIGNAL( sig, slap_set_shutdown );