I have a game server implemented in Python to which clients can connect and play against each other. I'd like to be able to reload configuration from a config file without restarting the server (as that would disconnect all clients). More specifically, I want to run a command which somehow tells the running server process that it should reload the config (or rather do some generic action, doesn't need to be specific to configuration reloading).
How is this usually implemented? I think it is a pretty common functionality but when searching, I only find questions about how to make a specific application XY reload but nothing on how to best implement this in my own application.
One option would be to monitor the config file for changes and automatically reload, but I would prefer to trigger the reloading manually.
I'm on Linux by the way and the solution doesn't need to be portable.