From 092ca7ab12bd0cc2dee1721d84d78a61d75d4aca Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 6 Aug 2026 01:04:02 +0100 Subject: trace: fsync immediately. --- kaagum/trace.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kaagum/trace.scm b/kaagum/trace.scm index 2c2c4ed..80e0f81 100644 --- a/kaagum/trace.scm +++ b/kaagum/trace.scm @@ -29,4 +29,8 @@ (display subsystem (%trace-port)) (display ": " (%trace-port)) (apply format (%trace-port) message args) - (newline (%trace-port)))) + (newline (%trace-port)) + ;; fsync the trace port to ensure that the trace is written to disk; just + ;; preparing for the worst-case scenario where kaagum crashes or is killed + ;; before the trace can reach the disk. + (fsync (%trace-port)))) -- cgit 1.4.1