mirror of
https://github.com/usatiuk/backup.git
synced 2025-10-26 17:37:47 +01:00
25 lines
487 B
C++
25 lines
487 B
C++
//
|
|
// Created by Stepan Usatiuk on 16.04.2023.
|
|
//
|
|
|
|
#ifndef SEMBACKUP_SIGNALS_H
|
|
#define SEMBACKUP_SIGNALS_H
|
|
|
|
#include <csignal>
|
|
|
|
/// Class to handle signals sent to the process
|
|
class Signals {
|
|
public:
|
|
/// Setup the signal handlers
|
|
static void setup();
|
|
|
|
volatile static inline std::sig_atomic_t shouldQuit = false;///< Indicates whether the program was requested to exit
|
|
|
|
private:
|
|
/// Handle the signals
|
|
static void handle(int signum);
|
|
};
|
|
|
|
|
|
#endif//SEMBACKUP_SIGNALS_H
|