Please sign in to comment.
Make Resettable lazy again (pantsbuild#7222)
### Problem In the context of pantsbuild#6817, there is a logging issue that manifests when the daemon forks. In particular, in `fork_context`, both the daemon and the client reset some services that implement `Resettable`. Some of those services log at startup, when the client hasn't had time to reconfigure its logging to stderr, and therefore all these startup logs are intermingled in the `pantsd.log` file. ### Solution If we make `Resettable` lazy again, since we are ensured to only enter `fork_context` under a lock, the logging can only happen when the client has had time to configure its loggers. ### Result `Resettable` is now lazy. `Resettable::get()` is now implemented in terms of `Resettable::with`.
- Loading branch information...
Showing with 23 additions and 15 deletions.