2 * Copyright © 2013 Canonical Ltd.
4 * This program is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License version 3,
6 * as published by the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU 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/>.
16 * Authored by: Thomas Voß <thomas.voss@canonical.com>
19 #ifndef CORE_POSIX_PROCESS_GROUP_H_
20 #define CORE_POSIX_PROCESS_GROUP_H_
22 #include <core/posix/signalable.h>
23 #include <core/posix/visibility.h>
34 * @brief The ProcessGroup class models a signalable group of process.
36 * Summary from http://en.wikipedia.org/wiki/Process_group:
38 * In POSIX-conformant operating systems, a process group denotes a collection
39 * of one or more processes. Process groups are used to control the distribution
40 * of signals. A signal directed to a process group is delivered individually to
41 * all of the processes that are members of the group.
43 class CORE_POSIX_DLL_PUBLIC ProcessGroup : public Signalable
47 * @brief Accesses the id of this process group.
48 * @return The id of this process group.
50 virtual pid_t id() const;
52 static ProcessGroup invalid();
56 CORE_POSIX_DLL_LOCAL ProcessGroup(pid_t id);
59 struct CORE_POSIX_DLL_LOCAL Private;
60 std::shared_ptr<Private> d;
65 #endif // CORE_POSIX_PROCESS_GROUP_H_