1
0
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:
Bram Matthys
2021-05-17 11:08:54 +02:00
parent 61e0ed3d03
commit d7bf35e0d9
2 changed files with 3 additions and 0 deletions
+1
View File
@@ -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;
+2
View File
@@ -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);