summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-12-20 10:23:40 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-12-20 10:23:40 +0000
commitab94b8a7fdad8b00a957ec28ef0ab904184fd8fb (patch)
treeeb83d57acd86b290b56c3f4059ec777205c55190
parent8f193966ccd2fe4d9e8eff0aefda35399bdc6e74 (diff)
downloadrsyslog-ab94b8a7fdad8b00a957ec28ef0ab904184fd8fb.tar.gz
rsyslog-ab94b8a7fdad8b00a957ec28ef0ab904184fd8fb.tar.xz
rsyslog-ab94b8a7fdad8b00a957ec28ef0ab904184fd8fb.zip
fixed race condition
-rw-r--r--threads.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/threads.c b/threads.c
index 04eea8f1..ea79c380 100644
--- a/threads.c
+++ b/threads.c
@@ -112,6 +112,7 @@ dbgprintf("Terminate thread %lx via method %d\n", pThis->thrdID, pThis->eTermToo
/* TODO: TIMEOUT! */
} else if(pThis->eTermTool == eTermSync_NONE) {
pthread_cancel(pThis->thrdID);
+ pthread_join(pThis->thrdID, NULL); /* wait for cancel to complete */
}
pThis->bIsActive = 0;