aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/build
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-07-14 23:50:16 +0200
committereldritch horrors <pennae@lix.systems>2024-07-20 12:33:49 +0000
commit0109368c3faf5516aeddde45e8dc3c33e7163838 (patch)
treef497a0354d3472be4ab7e32c111a6a57cf32aa84 /src/libstore/build
parentd8c09b583644105c25e3023e98ffceb75333af2e (diff)
libutil: make basic loggers thread-safe
SimpleLogger is not fully thread-safe, and all loggers that wrap it are also not safe accordingly. this does not affect much, but in rare cases it can cause interleaving of messages on stderr when used with the json or raw log formats. the fix applied here is a bit of a hack, but fixing this properly requires rearchitecting the logger infrastructure. nested loggers are not the most natural abstraction here, and it is biting us. Change-Id: Ifbf34fe1e85c60e73b59faee50e7411c7b5e7c12
Diffstat (limited to 'src/libstore/build')
-rw-r--r--src/libstore/build/derivation-goal.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/build/derivation-goal.cc b/src/libstore/build/derivation-goal.cc
index 6d86a44d0..7cf8a55c9 100644
--- a/src/libstore/build/derivation-goal.cc
+++ b/src/libstore/build/derivation-goal.cc
@@ -1166,7 +1166,7 @@ HookReply DerivationGoal::tryBuildHook()
}
else {
s += "\n";
- writeToStderr(s);
+ writeLogsToStderr(s);
}
}