[master] 43af86cc4 lck: Mention why we expect EINTR for a cond wait

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Thu Feb 15 11:30:10 UTC 2024


commit 43af86cc40ed78a4b41be60fa3542e45ad644285
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Thu Feb 15 12:28:08 2024 +0100

    lck: Mention why we expect EINTR for a cond wait

diff --git a/bin/varnishd/cache/cache_lck.c b/bin/varnishd/cache/cache_lck.c
index ee3d9a473..8f33dee8c 100644
--- a/bin/varnishd/cache/cache_lck.c
+++ b/bin/varnishd/cache/cache_lck.c
@@ -271,6 +271,9 @@ Lck_CondWaitUntil(pthread_cond_t *cond, struct lock *lck, vtim_real when)
 			errno = pthread_cond_timedwait(cond, &ilck->mtx, &ts);
 		}
 #endif
+		/* We should never observe EINTR, but we have in the past. For
+		 * example when sanitizers are enabled.
+		 */
 		assert(errno == 0 ||
 		    errno == ETIMEDOUT ||
 		    errno == EINTR);


More information about the varnish-commit mailing list