| 53 | |
| 54 | protected: |
| 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 | |
| 70 | private: |
| 71 | struct JobData { |
nothing calls this directly
no test coverage detected