MCPcopy Create free account
hub / github.com/3rdparty/libprocess / cleanup

Method cleanup

include/process/windows/jobobject.hpp:55–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53
54protected:
55 void cleanup(Future<Option<int>> exit_code, const pid_t pid)
56 {
57 CHECK(!exit_code.isPending());
58 CHECK(!exit_code.isDiscarded());
59
60 Try<Nothing> killJobResult = os::kill_job(jobs.at(pid).handle);
61 CHECK(!killJobResult.isError())
62 << "Failed to kill job object: " << killJobResult.error();
63
64 // Finally, erase the `JobData`, closing the last handle to the job object.
65 // All functionality requiring a live job object handle (but possibly a
66 // dead process) must happen prior to this, e.g. in a another parent hook.
67 jobs.erase(pid);
68 }
69
70private:
71 struct JobData {

Callers

nothing calls this directly

Calls 2

isPendingMethod · 0.80
isDiscardedMethod · 0.80

Tested by

no test coverage detected