diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-30 14:43:14 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-30 14:43:14 +0000 |
commit | 35c02f54dc057fd2ecdfa9397530d34c4fb0e916 (patch) | |
tree | a58fceba899347a88fe27febc115a93669435aff /omfile.c | |
parent | b2f49fd163eefb4cc1bcd36cd367e5cf4a5713a9 (diff) | |
download | rsyslog-35c02f54dc057fd2ecdfa9397530d34c4fb0e916.tar.gz rsyslog-35c02f54dc057fd2ecdfa9397530d34c4fb0e916.tar.xz rsyslog-35c02f54dc057fd2ecdfa9397530d34c4fb0e916.zip |
fixed a bug that caused a potential hang in file and fwd output module
varmojfekoj provided the patch - many thanks!
Diffstat (limited to 'omfile.c')
-rw-r--r-- | omfile.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -361,6 +361,7 @@ static void prepareFile(instanceData *pData, uchar *newFileName) pData->fd = open((char*) newFileName, O_WRONLY|O_APPEND|O_CREAT|O_NOCTTY, pData->fCreateMode); } else { + pData->fd = -1; /* file does not exist, create it (and eventually parent directories */ if(pData->bCreateDirs) { /* we fist need to create parent dirs if they are missing @@ -602,6 +603,7 @@ finalize_it: BEGINcreateInstance CODESTARTcreateInstance + pData->fd = -1; ENDcreateInstance |