Apache Mesos
Namespaces | Macros | Functions
ns.hpp File Reference
#include <sched.h>
#include <sys/syscall.h>
#include <set>
#include <string>
#include <stout/lambda.hpp>
#include <stout/nothing.hpp>
#include <stout/result.hpp>
#include <stout/try.hpp>

Go to the source code of this file.

Namespaces

 ns
 

Macros

#define CLONE_NEWNS   0x00020000
 
#define CLONE_NEWUTS   0x04000000
 
#define CLONE_NEWIPC   0x08000000
 
#define CLONE_NEWPID   0x20000000
 
#define CLONE_NEWNET   0x40000000
 
#define CLONE_NEWUSER   0x10000000
 
#define CLONE_NEWCGROUP   0x02000000
 

Functions

int setns (int fd, int nstype)
 
Try< int > ns::nstype (const std::string &ns)
 
Try< std::string > ns::nsname (int nsType)
 
std::set< int > ns::nstypes ()
 
Try< bool > ns::supported (int nsTypes)
 
Try< Nothingns::setns (const std::string &path, const std::string &ns, bool checkMultithreaded=true)
 
Try< Nothingns::setns (pid_t pid, const std::string &ns, bool checkMultithreaded=true)
 
Result< ino_t > ns::getns (pid_t pid, const std::string &ns)
 
Try< pid_tns::clone (pid_t target, int nstypes, const lambda::function< int()> &f, int flags)
 Performs an os::clone after entering a set of namespaces for the specified target process. More...
 
std::string ns::stringify (int flags)
 

Macro Definition Documentation

#define CLONE_NEWCGROUP   0x02000000
#define CLONE_NEWIPC   0x08000000
#define CLONE_NEWNET   0x40000000
#define CLONE_NEWNS   0x00020000
#define CLONE_NEWPID   0x20000000
#define CLONE_NEWUSER   0x10000000
#define CLONE_NEWUTS   0x04000000

Function Documentation

int setns ( int  fd,
int  nstype 
)
inline