process_group.cpp
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>
*/
#include <core/posix/process_group.h>
namespace core
{
namespace posix
{
struct ProcessGroup::Private
{
pid_t id;
};
pid_t ProcessGroup::id() const
{
return d->id;
}
ProcessGroup::ProcessGroup(pid_t id)
: Signalable(-id), // We rely on ::kill to deliver signals, thus negate the id (see man 2 kill).
d(new Private{id})
{
}
}
}
core::posix::ProcessGroup::ProcessGroup
CORE_POSIX_DLL_LOCAL ProcessGroup(pid_t id)
Definition process_group.cpp:35
core::posix::ProcessGroup::id
virtual pid_t id() const
Accesses the id of this process group.
Definition process_group.cpp:30
core::posix::Signalable
The Signalable class abstracts the ability of an entity to be delivered a posix signal.
Definition signalable.h:36
core
Definition child_process.h:32
process_group.h
core::posix::ProcessGroup::Private
Definition process_group.cpp:26
core::posix::ProcessGroup::Private::id
pid_t id
Definition process_group.cpp:27