mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-05 02:53:13 +02:00
Set loop.ircd_terminating when IRCd is terminating (signal 15, /DIE, etc)
This commit is contained in:
@@ -755,6 +755,7 @@ struct LoopStruct {
|
||||
unsigned do_bancheck_spamf_user : 1; /* perform 'user' spamfilter bancheck */
|
||||
unsigned do_bancheck_spamf_away : 1; /* perform 'away' spamfilter bancheck */
|
||||
unsigned ircd_rehashing : 1;
|
||||
unsigned ircd_terminating : 1;
|
||||
unsigned tainted : 1;
|
||||
Client *rehash_save_cptr, *rehash_save_client;
|
||||
int rehash_save_sig;
|
||||
|
||||
@@ -82,6 +82,7 @@ void s_die()
|
||||
Client *client;
|
||||
if (!IsService)
|
||||
{
|
||||
loop.ircd_terminating = 1;
|
||||
unload_all_modules();
|
||||
|
||||
list_for_each_entry(client, &lclient_list, lclient_node)
|
||||
@@ -96,6 +97,7 @@ void s_die()
|
||||
ControlService(hService, SERVICE_CONTROL_STOP, &status);
|
||||
}
|
||||
#else
|
||||
loop.ircd_terminating = 1;
|
||||
unload_all_modules();
|
||||
unlink(conf_files ? conf_files->pid_file : IRCD_PIDFILE);
|
||||
exit(0);
|
||||
|
||||
Reference in New Issue
Block a user