process.h
Go to the documentation of this file.
/*
* Copyright © 2013 Canonical Ltd.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Authored by: Thomas Voß <thomas.voss@canonical.com>
*/
#ifndef CORE_POSIX_PROCESS_H_
#define CORE_POSIX_PROCESS_H_
#include <core/posix/process_group.h>
#include <core/posix/signalable.h>
#include <core/posix/this_process.h>
#include <core/posix/visibility.h>
#include <core/posix/wait.h>
#include <memory>
#include <system_error>
namespace core
{
namespace posix
{
enum class Signal;
class Self;
class WaitFlags;
class CORE_POSIX_DLL_PUBLIC Process : public Signalable
{
public:
explicit Process(pid_t pid);
static Process invalid();
virtual ~Process() noexcept;
virtual pid_t pid() const;
virtual ProcessGroup process_group_or_throw() const;
virtual ProcessGroup process_group(std::error_code& se) const noexcept(true);
private:
struct CORE_POSIX_DLL_LOCAL Private;
std::shared_ptr<Private> d;
};
}
}
#endif // CORE_POSIX_PROCESS_H_
core::posix::ProcessGroup
The ProcessGroup class models a signalable group of process.
Definition process_group.h:44
core::posix::Process
The Process class models a process and possible operations on it.
Definition process.h:45
core::posix::Signalable
The Signalable class abstracts the ability of an entity to be delivered a posix signal.
Definition signalable.h:36
core::posix::Signal
Signal
The Signal enum collects the most common POSIX signals.
Definition signal.h:39
core
Definition child_process.h:32
process_group.h
signalable.h
core::posix::Process::Private
Definition process.cpp:34
this_process.h
visibility.h
CORE_POSIX_DLL_PUBLIC
#define CORE_POSIX_DLL_PUBLIC
Definition visibility.h:26
CORE_POSIX_DLL_LOCAL
#define CORE_POSIX_DLL_LOCAL
Definition visibility.h:27
wait.h