mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-19 06:29:58 -04:00
Write the log file before stderr, and keep a blocked console from stopping the log and the exit.
A selection in the console window of a game started directly held back the write to stderr, and with it the log file, the exit hook and the crash report. The log file now comes first, stderr goes past the C runtime's stream lock, and the lines of an exit, a fatal error or a crash skip stderr while another thread is stuck in it. A game run turns the console's QuickEdit mode off, and a closed console, Ctrl+C or Ctrl+Break ends the game the way a closed window does, with the settings and saves written and the exit logged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// Log writes on a thread of their own.
|
||||
//
|
||||
// A log line was written by the thread that logged it: to stderr and to the log file (main.c log_sink). A write can
|
||||
// A log line was written by the thread that logged it: to the log file and to stderr (main.c log_sink). A write can
|
||||
// stall: a console that scrolls, a pipe whose reader is busy, a virus scanner, a disk that flushes; hundreds of
|
||||
// milliseconds at worst. The render thread logs too, and a frame it spends in such a write is a hitch with nothing
|
||||
// else to show for it.
|
||||
|
||||
Reference in New Issue
Block a user