Commit Graph
4 Commits
Author SHA1 Message Date
NikoandClaude Opus 5.5 3abfe906bd test(relinker): run the file writer's replacement test on a copy of itself
The running-executable replacement test copied /bin/sleep under the
names "running" and "leftover" and started the copy. On Ubuntu 26.04
/bin/sleep is the uutils multi-call coreutils binary, which picks the
utility from the file name of the path it was started through, not
from argv[0], so the copy printed "coreutils: unknown program
'running'" and exited, and file_writer_binary and file_writer_text
failed without ever replacing a running executable. The test now
copies its own executable and starts it with a "wait" argument that
sleeps, so it no longer depends on how a system binary reads its name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 21:31:32 +02:00
SandstromPLandClaude Opus 5.5 26c62cc63d fix(relinker): give the output's temporary file a unique name
A relink killed between writing <output>.tmp and renaming it left that
file behind, and every later relink of the output then fell back to the
in-place write, bringing back the failure on a running build. The
temporary file is now created under a new name beside the output with
O_CREAT | O_EXCL and the previous permission bits, and written through
that descriptor, so a file left by an earlier run never blocks a
replacement and is never touched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 07:27:54 +05:30
SandstromPLandClaude Opus 5.5 92618d25c3 fix(relinker): replace output files instead of rewriting them in place
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 13:56:15 +05:30
Darko Gjorgjijoski 42594eecd4 fix(relinker): report buffered output write failures 2026-09-28 00:25:42 +02:00