Safely restart services to avoid race conditions.
At present, service restarts exhibit a race condition whereby the new (restarting) service process is often spawned before the old (stopping) process has terminated. This may result in the new service process failing to acquire a limited resource (file lock, socket bind, etc.) that the old process has not yet released. The new method preforms a safe service restart by stopping the service, waiting for the old service process to terminate, and (only then) start the new service process. In the event of "restarting" an already stopped service, the previous behavior is maintained whereby the service is simply started.
Loading
Please register or sign in to comment