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

Method kill

src/linux/cgroups.cpp:1462–1481  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1460 }
1461
1462 Future<Nothing> kill()
1463 {
1464 Try<set<pid_t>> processes = cgroups::processes(hierarchy, cgroup);
1465 if (processes.isError()) {
1466 return Failure(processes.error());
1467 }
1468
1469 // Reaping the frozen pids before we kill (and thaw) ensures we reap the
1470 // correct pids.
1471 foreach (const pid_t pid, processes.get()) {
1472 statuses.push_back(process::reap(pid));
1473 }
1474
1475 Try<Nothing> kill = cgroups::kill(hierarchy, cgroup, SIGKILL);
1476 if (kill.isError()) {
1477 return Failure(kill.error());
1478 }
1479
1480 return Nothing();
1481 }
1482
1483 Future<Nothing> thaw()
1484 {

Callers

nothing calls this directly

Calls 6

FailureClass · 0.85
NothingClass · 0.85
processesFunction · 0.70
killFunction · 0.70
errorMethod · 0.65
isErrorMethod · 0.45

Tested by

no test coverage detected