From 43af86cc40ed78a4b41be60fa3542e45ad644285 Mon Sep 17 00:00:00 2001 From: Dridi Boukelmoune Date: Thu, 15 Feb 2024 12:28:08 +0100 Subject: [PATCH] lck: Mention why we expect EINTR for a cond wait --- bin/varnishd/cache/cache_lck.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/varnishd/cache/cache_lck.c b/bin/varnishd/cache/cache_lck.c index ee3d9a47386..8f33dee8c4e 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);