Depends on how you structure it; if you process several connections in one thread / process, then you must somehow notify them of the exit (if you can, it depends on the protocol) before reloading the configuration (or exec itself).
If the protocol allows you to say "leave and return later", then it is clear that this is a good victory. If clients must remain connected, you can apply configuration changes to already connected clients, if it is a daemon of one process and one thread, if that makes sense.
If it's a multiprocessor, things get more complicated. You will need to notify the processes of the new configuration, or make sure that they continue with the old configuration, or that they can select the new configuration when their client shuts down.
If it is a multi-threaded thread, the threads would have to safely read the new configuration in the middle of what they were doing, which might require locking, or you could allocate memory for the new configuration and perform the switch somehow,
Markr
source share