aboutsummaryrefslogtreecommitdiff
path: root/lib/libcxx/src/random.cpp
diff options
context:
space:
mode:
authorIan Johnson <ian@ianjohnson.dev>2025-05-26 19:23:42 +0000
committerMatthew Lugg <mlugg@mlugg.co.uk>2025-08-26 12:02:50 +0100
commitd4df65e35504bc4a2fa500e03fbbaf95910035c8 (patch)
tree23528356b265434f0ec24e0220991880054db138 /lib/libcxx/src/random.cpp
parentd57b1e3552bae31c535a39d165608127579b9b08 (diff)
downloadzig-d4df65e35504bc4a2fa500e03fbbaf95910035c8.tar.gz
zig-d4df65e35504bc4a2fa500e03fbbaf95910035c8.zip
std.Build.Step.Compile: fix race condition in args file creation
Fixes #23993 Previously, if multiple build processes tried to create the same args file, there was a race condition with the use of the non-atomic `writeFile` function which could cause a spawned compiler to read an empty or incomplete args file. This commit avoids the race condition by first writing to a temporary file with a random path and renaming it to the desired path.
Diffstat (limited to 'lib/libcxx/src/random.cpp')
0 files changed, 0 insertions, 0 deletions