diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-02-11 07:47:27 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-02-11 07:47:27 +0000 |
commit | a745208787f3b2752e17d3171ca3e2a2f4f0d5c4 (patch) | |
tree | 5285880eb3e97a164f1f6e0ec31d13f56d92f716 | |
parent | 463e2d8f186e631d07cf8e45b62c725fbc817f8e (diff) | |
download | rsyslog-a745208787f3b2752e17d3171ca3e2a2f4f0d5c4.tar.gz rsyslog-a745208787f3b2752e17d3171ca3e2a2f4f0d5c4.tar.xz rsyslog-a745208787f3b2752e17d3171ca3e2a2f4f0d5c4.zip |
bugfix: errno could be changed during mark processing, leading to invalid
error messages when processing inputs. Thank to varmojfekoj for
pointing out this problem.
-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 |