aboutsummaryrefslogtreecommitdiff
path: root/lib/std/debug.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-04-18 13:08:30 -0700
committerAndrew Kelley <andrew@ziglang.org>2023-04-18 17:53:47 -0700
commit34286530b7c8beb070368b54abd8ec67a7344119 (patch)
treedd3875e55acaa831060a2acf14361c3fa190d8e9 /lib/std/debug.zig
parent30fc160874d743da74f7cf7c974c4c8cce03909e (diff)
downloadzig-34286530b7c8beb070368b54abd8ec67a7344119.tar.gz
zig-34286530b7c8beb070368b54abd8ec67a7344119.zip
Cache: fix multi-process race condition on macOS
This fixes `.INVAL => unreachable` being triggered by the cache system on macOS when multiple processes race to create the same compilation. The problem is that when two processes race to create a file, it sometimes returns ENOENT even though that error code is nonsensical for this situation. Commit 2b0929929d67e222ca6a9523a3a594ed456c4a51 purportedly solved this, but it did not open the file with write permissions, leading to the EINVAL panic later on. This commit remedies the situation by introducing a loop and simply retrying when the ENOENT occurs.
Diffstat (limited to 'lib/std/debug.zig')
0 files changed, 0 insertions, 0 deletions