From 87d772a7d708fec12f48cd8adc0dedff6e1025da Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 26 Aug 2024 10:15:20 +0200 Subject: Adding upstream version 1.47.0. Signed-off-by: Daniel Baumann --- src/daemon/daemon.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/daemon/daemon.c') diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c index f77b748a8..2392d4cc1 100644 --- a/src/daemon/daemon.c +++ b/src/daemon/daemon.c @@ -381,14 +381,14 @@ static void sched_setscheduler_set(void) { priority = (int)config_get_number(CONFIG_SECTION_GLOBAL, "process scheduling priority", priority); #ifdef HAVE_SCHED_GET_PRIORITY_MIN - errno = 0; + errno_clear(); if(priority < sched_get_priority_min(policy)) { netdata_log_error("scheduler %s (%d) priority %d is below the minimum %d. Using the minimum.", name, policy, priority, sched_get_priority_min(policy)); priority = sched_get_priority_min(policy); } #endif #ifdef HAVE_SCHED_GET_PRIORITY_MAX - errno = 0; + errno_clear(); if(priority > sched_get_priority_max(policy)) { netdata_log_error("scheduler %s (%d) priority %d is above the maximum %d. Using the maximum.", name, policy, priority, sched_get_priority_max(policy)); priority = sched_get_priority_max(policy); @@ -407,7 +407,7 @@ static void sched_setscheduler_set(void) { .sched_priority = priority }; - errno = 0; + errno_clear(); i = sched_setscheduler(0, policy, ¶m); if(i != 0) { netdata_log_error("Cannot adjust netdata scheduling policy to %s (%d), with priority %d. Falling back to nice.", -- cgit v1.2.3