summaryrefslogtreecommitdiff
path: root/t/t4013/diff.diff_initial..side
diff options
context:
space:
mode:
authorPaul Tarjan <github@paulisageek.com>2026-04-15 13:27:29 +0000
committerJunio C Hamano <gitster@pobox.com>2026-04-15 08:44:32 -0700
commit56cef9cb1a083c47b12b88548bf2126af8bfb263 (patch)
tree900434d32976c9671eb5e43c871cb76afbec34b5 /t/t4013/diff.diff_initial..side
parent8372c88f583b8910f1e57c00c89c0afcca7018dc (diff)
fsmonitor: use pthread_cond_timedwait for cookie wait
The cookie wait in with_lock__wait_for_cookie() uses an infinite pthread_cond_wait() loop. The existing comment notes the desire to switch to pthread_cond_timedwait(), but the routine was not available in git thread-utils. On certain container or overlay filesystems, inotify watches may succeed but events are never delivered. In this case the daemon would hang indefinitely waiting for the cookie event, which in turn causes the client to hang. Replace the infinite wait with a one-second timeout using pthread_cond_timedwait(). If the timeout fires, report an error and let the client proceed with a trivial (full-scan) response rather than blocking forever. Signed-off-by: Paul Tarjan <github@paulisageek.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.diff_initial..side')
0 files changed, 0 insertions, 0 deletions