mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-04 21:29:21 +00:00
Report a failed write in log.vmmap.dump
The dump is only flushed at fclose, whose result was discarded.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user