From c09192631a84db0c3f5f808846f2adbcecd7b35f Mon Sep 17 00:00:00 2001
From: Tim Wickberg <tim@schedmd.com>
Date: Wed, 15 Jun 2016 05:56:38 -0400
Subject: [PATCH] Change slurm_cond_timedwait to not print messages on
 ETIMEDOUT

Presumably you're okay handling timeouts when calling slurm_cond_timedwait
otherwise you should have used slurm_cond_wait.

Bug 2829.
---
 src/common/macros.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/common/macros.h b/src/common/macros.h
index 8397cdee719..3a06ea74c5b 100644
--- a/src/common/macros.h
+++ b/src/common/macros.h
@@ -148,11 +148,13 @@
 		}							\
 	} while (0)
 
+/* ignore timeouts, you must be able to handle them if
+ * calling cond_timedwait instead of cond_wait */
 #define slurm_cond_timedwait(cond, mutex, abstime)			\
 	do {								\
 		int err = pthread_cond_timedwait(cond, mutex, abstime);	\
-		if (err) {						\
-			debug("%s:%d %s: pthread_cond_timedwait(): %s",	\
+		if (err != ETIMEDOUT) {					\
+			error("%s:%d %s: pthread_cond_timedwait(): %s",	\
 				__FILE__, __LINE__, __func__,		\
 				strerror(err));				\
 		}							\
-- 
GitLab