quickmod/FuseMounter/signalhandler.h

32 lines
602 B
C
Raw Normal View History

#ifndef SIGNALHANDLER_H
#define SIGNALHANDLER_H
#include <QObject>
#include <QSocketNotifier>
class SignalHandler : public QObject
{
Q_OBJECT
public:
explicit SignalHandler(QObject *parent = nullptr);
// Unix signal handlers.
static int setup_unix_signal_handlers();
protected:
static void hupSignalHandler(int _unused);
public slots:
// Qt signal handlers.
void handleSigHup(QSocketDescriptor socket, QSocketNotifier::Type type);
private:
//static int sighupFd[2];
QSocketNotifier *snHup;
signals:
void hupSignalReceived();
};
#endif // SIGNALHANDLER_H