]> git.sur5r.net Git - openldap/blobdiff - servers/slurpd/ri.c
include portable.h
[openldap] / servers / slurpd / ri.c
index cc478d1e6a77386007feb94078d5b432e56bfd87..e11fc30f7bfc86c4cb26225c2ec318c08016401b 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 
+#include "portable.h"
 
 #include <stdio.h>
 #include <signal.h>
@@ -60,7 +61,11 @@ Ri_process(
     int                rc ;
     char       *errmsg;
 
+#ifdef SIGSTKFLT
+    (void) SIGNAL( SIGSTKFLT, (void *) do_nothing );
+#else
     (void) SIGNAL( SIGUSR1, (void *) do_nothing );
+#endif
     (void) SIGNAL( SIGPIPE, SIG_IGN );
     if ( ri == NULL ) {
        Debug( LDAP_DEBUG_ANY, "Error: Ri_process: ri == NULL!\n", 0, 0, 0 );
@@ -146,7 +151,8 @@ Ri_process(
 
 
 /*
- * Wake a replication thread which may be sleeping.  Send it a SIGUSR1.
+ * Wake a replication thread which may be sleeping.
+ * Send it a SIG(STKFLT|USR1).
  */
 static void
 Ri_wake(
@@ -156,8 +162,13 @@ Ri_wake(
     if ( ri == NULL ) {
        return;
     }
+#ifdef SIGSTKFLT
+    pthread_kill( ri->ri_tid, SIGSTKFLT );
+    (void) SIGNAL( SIGSTKFLT, (void *) do_nothing );
+#else
     pthread_kill( ri->ri_tid, SIGUSR1 );
     (void) SIGNAL( SIGUSR1, (void *) do_nothing );
+#endif
 }