summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-09-26 16:10:05 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-09-26 16:10:05 +0200
commitb8e82d59b7aba7da65e4244a29b92274aa50d08d (patch)
treefd14dccafc8bbf40c17cd1729f047ae17b0c7eb5
parentdc44f5a475101aa18568a0eaceacc2a4eb718391 (diff)
downloadrsyslog-b8e82d59b7aba7da65e4244a29b92274aa50d08d.tar.gz
rsyslog-b8e82d59b7aba7da65e4244a29b92274aa50d08d.tar.xz
rsyslog-b8e82d59b7aba7da65e4244a29b92274aa50d08d.zip
fixed potential race condition on HUP and termination
-rw-r--r--runtime/wtp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/runtime/wtp.c b/runtime/wtp.c
index 8b041ea2..54f12b2b 100644
--- a/runtime/wtp.c
+++ b/runtime/wtp.c
@@ -169,7 +169,9 @@ wtpWakeupAllWrkr(wtp_t *pThis)
DEFiRet;
ISOBJ_TYPE_assert(pThis, wtp);
+ d_pthread_mutex_lock(pThis->pmutUsr);
pthread_cond_broadcast(pThis->pcondBusy);
+ d_pthread_mutex_unlock(pThis->pmutUsr);
RETiRet;
}