cluck 1.0.1
The cluster lock service.
interrupt.h
Go to the documentation of this file.
1// Copyright (c) 2016-2025 Made to Order Software Corp. All Rights Reserved
2//
3// https://snapwebsites.org/project/cluck
4// contact@m2osw.com
5//
6// This program is free software: you can redistribute it and/or modify
7// it under the terms of the GNU General Public License as published by
8// the Free Software Foundation, either version 3 of the License, or
9// (at your option) any later version.
10//
11// This program is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14// GNU General Public License for more details.
15//
16// You should have received a copy of the GNU General Public License
17// along with this program. If not, see <https://www.gnu.org/licenses/>.
18#pragma once
19
20// eventdispatcher
21//
22#include <eventdispatcher/signal.h>
23
24
25// C
26//
27#include <signal.h>
28
29
30
31namespace cluck_daemon
32{
33
34
35
36class cluckd;
37
38
39
41 : public ed::signal
42{
43public:
44 typedef std::shared_ptr<interrupt> pointer_t;
45
46 interrupt(cluckd * c);
47 interrupt(interrupt const & rhs) = delete;
48 virtual ~interrupt() override;
49
50 interrupt & operator = (interrupt const & rhs) = delete;
51
52 // ed::connection implementation
53 virtual void process_signal() override;
54
55private:
56 cluckd * f_cluckd = nullptr;
57};
58
59
60
61} // namespace cluck_daemon
62// vim: ts=4 sw=4 et
Class handling intercomputer locking.
Definition cluckd.h:48
Handle the SIGINT Unix signal.
Definition interrupt.h:42
interrupt(interrupt const &rhs)=delete
virtual ~interrupt() override
Definition interrupt.cpp:64
std::shared_ptr< interrupt > pointer_t
Definition interrupt.h:44
virtual void process_signal() override
Call the stop function of the cluckd object.
Definition interrupt.cpp:74
interrupt & operator=(interrupt const &rhs)=delete

This document is part of the Snap! Websites Project.

Copyright by Made to Order Software Corp.