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

Function disable

src/linux/cgroups.cpp:2522–2541  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2520
2521
2522Try<Nothing> disable(const string& hierarchy, const string& cgroup)
2523{
2524 Try<bool> enabled = killer::enabled(hierarchy, cgroup);
2525
2526 if (enabled.isError()) {
2527 return Error(enabled.error());
2528 }
2529
2530 if (enabled.get()) {
2531 Try<Nothing> write = cgroups::write(
2532 hierarchy, cgroup, "memory.oom_control", "1");
2533
2534 if (write.isError()) {
2535 return Error("Could not write 'memory.oom_control' control file: " +
2536 write.error());
2537 }
2538 }
2539
2540 return Nothing();
2541}
2542
2543} // namespace killer {
2544

Callers

nothing calls this directly

Calls 7

NothingClass · 0.85
enabledFunction · 0.70
writeFunction · 0.70
errorMethod · 0.65
ErrorFunction · 0.50
isErrorMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected