#include "portable.h"
#include <stdio.h>
+#include <stdlib.h>
#include <ac/signal.h>
#include "slurp.h"
#include "globals.h"
-/* External references */
-extern void write_reject LDAP_P(( Ri *, Re *, int, char * ));
-extern void do_nothing LDAP_P(());
-
/* Forward references */
static int ismine LDAP_P(( Ri *, Re * ));
static int isnew LDAP_P(( Ri *, Re * ));
-void tsleep LDAP_P(( time_t ));
/*
{
Rq *rq = sglob->rq;
Re *re, *new_re;
- int i;
int rc ;
char *errmsg;
-#ifdef HAVE_LINUX_THREADS
- (void) SIGNAL( SIGSTKFLT, do_nothing );
-#else
- (void) SIGNAL( SIGUSR1, do_nothing );
-#endif
+ (void) SIGNAL( LDAP_SIGUSR1, do_nothing );
(void) SIGNAL( SIGPIPE, SIG_IGN );
if ( ri == NULL ) {
Debug( LDAP_DEBUG_ANY, "Error: Ri_process: ri == NULL!\n", 0, 0, 0 );
while ( !sglob->slurpd_shutdown &&
((new_re = re->re_getnext( re )) == NULL )) {
if ( sglob->one_shot_mode ) {
+ rq->rq_unlock( rq );
return 0;
}
/* No work - wait on condition variable */
/*
* Wake a replication thread which may be sleeping.
- * Send it a SIG(STKFLT|USR1).
+ * Send it a LDAP_SIGUSR1.
*/
static void
Ri_wake(
if ( ri == NULL ) {
return;
}
-#ifdef HAVE_LINUX_THREADS
- pthread_kill( ri->ri_tid, SIGSTKFLT );
- (void) SIGNAL( SIGSTKFLT, do_nothing );
-#else
- pthread_kill( ri->ri_tid, SIGUSR1 );
- (void) SIGNAL( SIGUSR1, do_nothing );
-#endif
+ pthread_kill( ri->ri_tid, LDAP_SIGUSR1 );
+ (void) SIGNAL( LDAP_SIGUSR1, do_nothing );
}
sglob->st->st_unlock( sglob->st );
return ret;
}
-
-