summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-03-17 18:26:15 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2009-03-17 18:26:15 +0100
commit3762d2b7bc669e45d51a2157158e3cc925dd0152 (patch)
tree24ba49dd028c3a606793a21a40bf98a8a1e1b11c /tools
parentf289422585ef36c39c5bc22ea20344d0c76b29ab (diff)
downloadrsyslog-3762d2b7bc669e45d51a2157158e3cc925dd0152.tar.gz
rsyslog-3762d2b7bc669e45d51a2157158e3cc925dd0152.tar.xz
rsyslog-3762d2b7bc669e45d51a2157158e3cc925dd0152.zip
fixed some message-loss situations when file write failures happened
Diffstat (limited to 'tools')
-rw-r--r--tools/omfile.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/tools/omfile.c b/tools/omfile.c
index 28bdcf2e..8be815f2 100644
--- a/tools/omfile.c
+++ b/tools/omfile.c
@@ -600,20 +600,14 @@ again:
}
}
- if (write(pData->fd, ppString[0], strlen((char*)ppString[0])) < 0) {
+ if(write(pData->fd, ppString[0], strlen((char*)ppString[0])) < 0) {
int e = errno;
+dbgprintf("++++++++++ log file writer error %d\n", e);
/* If a named pipe is full, just ignore it for now
- mrn 24 May 96 */
if (pData->fileType == eTypePIPE && e == EAGAIN)
- ABORT_FINALIZE(RS_RET_OK);
-
- /* If the filesystem is filled up, just ignore
- * it for now and continue writing when possible
- * based on patch for sysklogd by Martin Schulze on 2007-05-24
- */
- if (pData->fileType == eTypeFILE && e == ENOSPC)
- ABORT_FINALIZE(RS_RET_OK);
+ ABORT_FINALIZE(RS_RET_SUSPENDED);
(void) close(pData->fd);
/* Check for EBADF on TTY's due to vhangup()