diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | syslogd.c | 3 |
2 files changed, 6 insertions, 0 deletions
@@ -7,6 +7,9 @@ Version 2.0.2 STABLE (rgerhards), 2008-02-?? they run rsyslog ;)) - bugfix: suspended actions were not always properly resumed varmojfekoj provided the patch - many thanks! +- bugfix: errno could be changed during mark processing, leading to + invalid error messages when processing inputs. Thank to varmojfekoj for + pointing out this problem. --------------------------------------------------------------------------- Version 2.0.1 STABLE (rgerhards), 2008-01-24 - fixed a bug in integer conversion - but this function was never called, @@ -5898,6 +5898,7 @@ static void mainloop(void) int i; int maxfds; int nfds; + int errnoSave; #ifdef SYSLOG_INET selectHelperWriteFDSInfo_t writeFDSInfo; fd_set writefds; @@ -6036,6 +6037,7 @@ static void mainloop(void) #endif nfds = select(maxfds+1, (fd_set *) &readfds, MAIN_SELECT_WRITEFDS, (fd_set *) NULL, MAIN_SELECT_TIMEVAL); + errnoSave = errno; /* save errno for later reference */ if(bRequestDoMark) { domark(); @@ -6056,6 +6058,7 @@ static void mainloop(void) continue; } + errno = errnoSave; /* restore errno to state right after select (which is what we need) -- rgerhards, 2008-02-11 */ processSelectAfter(maxfds, nfds, &readfds, MAIN_SELECT_WRITEFDS); #undef MAIN_SELECT_TIMEVAL |