diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2010-03-25 08:13:58 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2010-03-25 08:13:58 +0100 |
commit | bcddd30c2e9d8594a67a853c389c4424aa0c6524 (patch) | |
tree | 5824ae4e0daa82b254bb1d552b1ef33d0fcac6c1 /tools | |
parent | a3e48b697fa664110567fcd0027d24ea5a239041 (diff) | |
download | rsyslog-bcddd30c2e9d8594a67a853c389c4424aa0c6524.tar.gz rsyslog-bcddd30c2e9d8594a67a853c389c4424aa0c6524.tar.xz rsyslog-bcddd30c2e9d8594a67a853c389c4424aa0c6524.zip |
undo experimental commit dccadb677c5a6b8379f631e4c1f14c8c4089d4a6
Further testing turned out that the rsyslog core works correctly and
this fix is not needed. The concurrency we saw was actually caused by
other actions (even processes) during directory creation. See commit
9e5b31fc44136dbcc1e443cfe7714e9daf97d844 for further details.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/omfile.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/tools/omfile.c b/tools/omfile.c index 2a14f45b..774f0b96 100644 --- a/tools/omfile.c +++ b/tools/omfile.c @@ -48,7 +48,6 @@ #include <libgen.h> #include <unistd.h> #include <sys/file.h> -#include <pthread.h> #ifdef OS_SOLARIS # include <fcntl.h> @@ -66,7 +65,6 @@ #include "stream.h" #include "unicode-helper.h" #include "atomic.h" -#include "debug.h" MODULE_TYPE_OUTPUT @@ -136,7 +134,6 @@ typedef struct _instanceData { int iIOBufSize; /* size of associated io buffer */ int iFlushInterval; /* how fast flush buffer on inactivity? */ bool bFlushOnTXEnd; /* flush write buffers when transaction has ended? */ - pthread_mutex_t mutEx; /* guard ourselves against being called multiple times with the same instance */ } instanceData; @@ -619,7 +616,6 @@ finalize_it: BEGINcreateInstance CODESTARTcreateInstance pData->pStrm = NULL; - pthread_mutex_init(&pData->mutEx, NULL); ENDcreateInstance @@ -629,7 +625,6 @@ CODESTARTfreeInstance dynaFileFreeCache(pData); } else if(pData->pStrm != NULL) strm.Destruct(&pData->pStrm); - pthread_mutex_destroy(&pData->mutEx); ENDfreeInstance @@ -639,7 +634,6 @@ ENDtryResume BEGINdoAction CODESTARTdoAction - d_pthread_mutex_lock(&pData->mutEx); DBGPRINTF("file to log to: %s\n", pData->f_fname); CHKiRet(writeFile(ppString, iMsgOpts, pData)); if(pData->bFlushOnTXEnd) { @@ -647,7 +641,6 @@ CODESTARTdoAction CHKiRet(strm.Flush(pData->pStrm)); } finalize_it: - d_pthread_mutex_unlock(&pData->mutEx); ENDdoAction @@ -784,7 +777,6 @@ static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __a BEGINdoHUP CODESTARTdoHUP - d_pthread_mutex_lock(&pData->mutEx); if(pData->bDynamicName) { dynaFileFreeCacheEntries(pData); } else { @@ -793,7 +785,6 @@ CODESTARTdoHUP pData->pStrm = NULL; } } - d_pthread_mutex_unlock(&pData->mutEx); ENDdoHUP |