1
0
mirror of https://github.com/anope/anope.git synced 2026-06-26 16:36:39 +02:00

Save the databases on SIGUSR1.

This commit is contained in:
Sadie Powell
2025-03-11 13:01:04 +00:00
parent b14befc77c
commit fb0ee27df0
+8 -1
View File
@@ -160,6 +160,11 @@ void Anope::HandleSignal()
Anope::Quitting = true;
Anope::SaveDatabases();
break;
#ifndef _WIN32
case SIGUSR1:
Anope::SaveDatabases();
break;
#endif
}
Signal = 0;
@@ -198,8 +203,10 @@ static void InitSignals()
sa.sa_handler = SignalHandler;
#ifndef _WIN32
sigaction(SIGUSR1, &sa, NULL);
#endif
sigaction(SIGHUP, &sa, NULL);
sigaction(SIGTERM, &sa, NULL);
sigaction(SIGINT, &sa, NULL);