From: Howard Chu Date: Sat, 21 Sep 2002 03:52:16 +0000 (+0000) Subject: Fix ITS#1033 slapd hangs with GNU Pth - don't write to the wakefd X-Git-Tag: NO_SLAP_OP_BLOCKS~949 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=bdf9b3ae1bf92bbeb114fbe0eee8078130f4dbcb;p=openldap Fix ITS#1033 slapd hangs with GNU Pth - don't write to the wakefd more than once at any given time. --- diff --git a/servers/slapd/daemon.c b/servers/slapd/daemon.c index 151b6d395b..94de3b729b 100644 --- a/servers/slapd/daemon.c +++ b/servers/slapd/daemon.c @@ -49,7 +49,7 @@ Listener **slap_listeners = NULL; static ber_socket_t wake_sds[2]; -#ifdef NO_THREADS +#if defined(NO_THREADS) || defined(HAVE_GNU_PTH) static int waking; #define WAKE_LISTENER(w) \ ((w && !waking) ? tcp_write( wake_sds[1], "0", 1 ), waking=1 : 0) @@ -1315,7 +1315,7 @@ slapd_daemon_task( if( FD_ISSET( wake_sds[0], &readfds ) ) { char c[BUFSIZ]; tcp_read( wake_sds[0], c, sizeof(c) ); -#ifdef NO_THREADS +#if defined(NO_THREADS) || defined(HAVE_GNU_PTH) waking = 0; #endif continue;