Reading a file is not even atomic - you can race with concurrent writes.
The only safe way to update a config file of a running service is with POSIX atomic rename, and most editors don't do that by default.
The only safe way to update a config file of a running service is with POSIX atomic rename, and most editors don't do that by default.
(Even I'm not sure if this is sarcasm any more)
And it is being obsoleted, with the elephant in the room being that the Windows Registry needs to be thread-safe because it's a central store of all settings and this was a really bad idea. I'll also have my nginx.conf over a registry entries file any day of the week.