Report a failed write in log.vmmap.dump

The dump is only flushed at fclose, whose result was discarded.
This commit is contained in:
noctuum
2026-09-18 22:17:59 +05:00
committed by Jari Sundell
parent b1be898ba1
commit 1b15b7c518
+4 -1
View File
@@ -122,7 +122,10 @@ log_vmmap_dump(const std::string& str) {
fprintf(log_file, "%8p-%8p [%5llxk]\n", all_mapping.ptr, (char*)all_mapping.ptr + all_mapping.length, (long long unsigned int)(all_mapping.length / 1024));
}
fclose(log_file);
// The buffered output only reaches the kernel here.
if (fclose(log_file) != 0)
throw torrent::input_error("Could not write log file: " + str);
return torrent::Object();
}