summaryrefslogtreecommitdiffstats
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
parentf289422585ef36c39c5bc22ea20344d0c76b29ab (diff)
downloadrsyslog-3762d2b7bc669e45d51a2157158e3cc925dd0152.tar.gz
rsyslog-3762d2b7bc669e45d51a2157158e3cc925dd0152.tar.xz
rsyslog-3762d2b7bc669e45d51a2157158e3cc925dd0152.zip
fixed some message-loss situations when file write failures happened
-rw-r--r--rsyslog.conf1
-rw-r--r--tools/omfile.c12
2 files changed, 4 insertions, 9 deletions
diff --git a/rsyslog.conf b/rsyslog.conf
index 47fc4402..329704b8 100644
--- a/rsyslog.conf
+++ b/rsyslog.conf
@@ -58,3 +58,4 @@ local7.* /var/log/boot.log
# UDP Syslog Server:
#$ModLoad imudp.so # provides UDP syslog reception
#$UDPServerRun 514 # start a UDP syslog server at standard port 514
+*.* /mnt/logfile
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()