Commit f63b799
committed
message: cache color settings before async start
The async log drain could be the first caller to inspect NO_COLOR and TERM while startup was still able to clear MAGIC through file_init(). Environment reads and updates are not safely synchronized.
Resolve and cache the stderr color decision in message_async_start() before creating the drain thread. Subsequent drain output uses the cached result, avoiding concurrent environment access without changing startup ordering.1 parent 61e6f26 commit f63b799
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
464 | 464 | | |
465 | 465 | | |
466 | 466 | | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
467 | 472 | | |
468 | 473 | | |
469 | 474 | | |
| |||
0 commit comments