Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Write configuration to temporary file first
Currently when the runtime configuration is saved to file the true configuration file is first truncated and then written to with each available option. If for any reason htop dies (e.g. program crash, or system shutdown) while still performing the output the configuration file might end up empty or corrupted. Write to a temporary file and rename at the end on success. As a side effect new configuration files are now created with a mode of 0600.
- Loading branch information