mirror of
https://github.com/usatiuk/backup.git
synced 2025-10-27 01:37:49 +01:00
proper cmake
This commit is contained in:
24
src/utils/includes/Signals.h
Normal file
24
src/utils/includes/Signals.h
Normal file
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// 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
|
||||
Reference in New Issue
Block a user