[Nagios-devel] [PATCH 2/2] base/events: Don't shut down when

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

[Nagios-devel] [PATCH 2/2] base/events: Don't shut down when

Post by Guest »

From: Robin Sonefors

My patch in commit #2452 was incorrect, as it didn't ignore EINTR - we
should not shut down nagios due to EINTR, as that makes it awfully
complicated to discover what's going on.

Signed-off-by: Robin Sonefors
---
base/events.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/base/events.c b/base/events.c
index cdaa188..5a1a5ea 100644
--- a/base/events.c
+++ b/base/events.c
@@ -1003,7 +1003,7 @@ int event_execution_loop(void) {
poll_time_ms, iobroker_get_num_fds(nagios_iobs),
squeue_size(nagios_squeue), nagios_iobs);
inputs = iobroker_poll(nagios_iobs, poll_time_ms);
- if (inputs < 0) {
+ if (inputs < 0 && errno != EINTR) {
logit(NSLOG_RUNTIME_ERROR, TRUE, "Error polling for input, giving up");
break;
}
--
1.7.11.7






This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked