Improve shutdown signal safeness
The signal handler no longer acquires the service list lock which removes a number of deadlock possibilities from the shutdown process. Instead, a global shutdown flag is set that serves the same purpose as the individual service shutdown flags did.
This commit is contained in:
@ -944,7 +944,7 @@ static int get_users(SERV_LISTENER *listener, bool skip_local)
|
||||
int total_users = -1;
|
||||
bool no_active_servers = true;
|
||||
|
||||
for (server = service->dbref; !service->svc_do_shutdown && server; server = server->next)
|
||||
for (server = service->dbref; !service_should_stop && server; server = server->next)
|
||||
{
|
||||
if (!SERVER_REF_IS_ACTIVE(server) || !server_is_active(server->server) ||
|
||||
(skip_local && server_is_mxs_service(server->server)))
|
||||
|
Reference in New Issue
Block a user