2 * Copyright (C) 2015 Canonical, Ltd.
4 * This program is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License version 3, as published
6 * by the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranties of
10 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
11 * PURPOSE. See the GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License along
14 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 * Author: Marcus Tomlinson <marcus.tomlinson@canonical.com>
22#include <QSocketNotifier>
26class UnixSignalHandler: public QObject {
30 UnixSignalHandler(const std::function<void()>& f, QObject *parent = 0);
31 ~UnixSignalHandler() = default;
33 static int setupUnixSignalHandlers();
41 static void hupSignalHandler(int unused);
42 static void intSignalHandler(int unused);
43 static void termSignalHandler(int unused);
45 static int sighupFd[2];
46 static int sigintFd[2];
47 static int sigtermFd[2];
49 std::function<void()> m_func;
51 QSocketNotifier *m_socketNotifierHup;
52 QSocketNotifier *m_socketNotifierInt;
53 QSocketNotifier *m_socketNotifierTerm;
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list