// SPDX-FileCopyrightText: 2024 Lizzy Fleckenstein // // SPDX-License-Identifier: AGPL-3.0-or-later #include #include #include "sig.h" bool signal_stop = false; static void handle_signal(int sig) { (void) sig; signal_stop = true; } void signal_setup() { struct sigaction sa; sa.sa_handler = &handle_signal; sigaction(SIGINT, &sa, NULL); sigaction(SIGTERM, &sa, NULL); }