2
* Copyright (C) 2014 Canonical, Ltd.
4
* This program is free software: you can redistribute it and/or modify it under
5
* the terms of the GNU Lesser General Public License version 3, as published by
6
* the Free Software Foundation.
8
* This program is distributed in the hope that it will be useful, but WITHOUT
9
* ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
10
* SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
* Lesser General Public License for more details.
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18
#ifndef PROCESS_CONTROLLER_H
19
#define PROCESS_CONTROLLER_H
21
#include <QSharedPointer>
23
#include <sys/types.h>
28
class ProcessController
35
OomController(const OomController&) = delete;
36
virtual ~OomController() = default;
38
OomController& operator=(const OomController&) = delete;
40
virtual void ensureProcessLikelyToBeKilled(pid_t);
41
virtual void ensureProcessUnlikelyToBeKilled(pid_t);
45
ProcessController(const ProcessController&) = delete;
46
virtual ~ProcessController();
48
ProcessController& operator=(const ProcessController&) = delete;
50
virtual const QSharedPointer<OomController>& oomController() const;
52
virtual bool sigStopProcessGroupForPid(pid_t pid) const;
53
virtual bool sigContinueProcessGroupForPid(pid_t pid) const;
56
QSharedPointer<OomController> m_oomController;
61
#endif // PROCESS_CONTROLLER_H