MCPcopy Create free account
hub / github.com/apache/mesos / namespaces

Function namespaces

src/linux/ns.cpp:105–121  ·  view source on GitHub ↗

TODO(jpeach): As we move namespace parameters from strings to CLONE constants, we should be able to eventually remove the internal uses of this function.

Source from the content-addressed store, hash-verified

103// constants, we should be able to eventually remove the internal uses
104// of this function.
105static set<string> namespaces()
106{
107 set<string> result;
108
109 Try<std::list<string>> entries = os::ls("/proc/self/ns");
110 if (entries.isSome()) {
111 foreach (const string& entry, entries.get()) {
112 // Introduced in Linux 4.12, pid_for_children is a handle for the PID
113 // namespace of child processes created by the current process.
114 if (entry != "pid_for_children") {
115 result.insert(entry);
116 }
117 }
118 }
119
120 return result;
121}
122
123
124set<int> nstypes()

Callers 2

setnsFunction · 0.85
getnsFunction · 0.85

Calls 2

lsFunction · 0.50
isSomeMethod · 0.45

Tested by

no test coverage detected