mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-12 15:23:11 -05:00
Fix ITS#1033 slapd hangs with GNU Pth - don't write to the wakefd
more than once at any given time.
This commit is contained in:
parent
9a8eadb9de
commit
bdf9b3ae1b
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue