Fork Vasum on GitHub Official Vasum Wiki on Tizen.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
process.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License version 2.1 as published by the Free Software Foundation.
7  *
8  * This library 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 GNU
11  * Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public
14  * License along with this library; if not, write to the Free Software
15  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16  */
17 
24 #ifndef LXCPP_PROCESS_HPP
25 #define LXCPP_PROCESS_HPP
26 
27 #include "lxcpp/namespace.hpp"
28 
29 #include <sys/types.h>
30 #include <vector>
31 
32 namespace lxcpp {
33 
34 pid_t fork();
35 
36 pid_t clone(int (*function)(void *),
37  void *args,
38  const int flags);
39 
40 void setns(const pid_t pid, const int namespaces);
41 
42 int waitpid(const pid_t pid);
43 
44 void unshare(const int ns);
45 
46 void execve(const std::vector<std::string>& argv);
47 
48 } // namespace lxcpp
49 
50 #endif // LXCPP_PROCESS_HPP
int waitpid(const pid_t pid)
Definition: process.cpp:128
process handling routines
pid_t fork()
Definition: process.cpp:41
void setns(const pid_t pid, int requestedNamespaces)
Definition: process.cpp:74
void execve(const std::vector< std::string > &argv)
Definition: process.cpp:166
void unshare(const int ns)
Definition: process.cpp:157
pid_t clone(int(*function)(void *), void *args, const int flags)
Definition: process.cpp:53