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

Function getCustomCloneFunc

src/checks/checker_process.cpp:143–159  ·  view source on GitHub ↗

The return type matches the `clone` function parameter in `process::subprocess`.

Source from the content-addressed store, hash-verified

141// The return type matches the `clone` function parameter in
142// `process::subprocess`.
143static Option<lambda::function<pid_t(const lambda::function<int()>&)>>
144getCustomCloneFunc(const Option<runtime::Plain>& plain)
145{
146 if (plain.isNone() || plain->namespaces.empty()) {
147 return None();
148 }
149
150#ifdef __linux__
151 return lambda::bind(
152 &cloneWithSetns,
153 lambda::_1,
154 plain->taskPid,
155 plain->namespaces);
156#else
157 return None();
158#endif // __linux__
159}
160
161
162// Reads `ProcessIO::Data` records from a string containing "Record-IO"

Callers 3

commandCheckMethod · 0.85
_httpCheckMethod · 0.85
_tcpCheckMethod · 0.85

Calls 4

NoneClass · 0.85
bindFunction · 0.50
isNoneMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected