diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-24 07:27:08 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-24 07:27:08 +0000 |
commit | 5abc990a6a2178bbc730a43bd0ee9b433abc8303 (patch) | |
tree | a8e37e44bd6aeb4f7009be3d67314008a453e9cb /omfile.c | |
parent | 3b176b63e167c0d3ca0aefdd549b667bd863a1f0 (diff) | |
download | rsyslog-5abc990a6a2178bbc730a43bd0ee9b433abc8303.tar.gz rsyslog-5abc990a6a2178bbc730a43bd0ee9b433abc8303.tar.bz2 rsyslog-5abc990a6a2178bbc730a43bd0ee9b433abc8303.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
@@ -357,6 +357,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 @@ -596,6 +597,7 @@ again: BEGINcreateInstance CODESTARTcreateInstance + pData->fd = -1; ENDcreateInstance |