Attach a child process HANDLE to the job.
| 24 | } |
| 25 | // Attach a child process HANDLE to the job. |
| 26 | void Attach(HANDLE hChild) const |
| 27 | { |
| 28 | if (!::AssignProcessToJobObject(hJob_, hChild)) { |
| 29 | ThrowLastError_("AssignProcessToJobObject"); |
| 30 | } |
| 31 | } |
| 32 | private: |
| 33 | static void ThrowLastError_(const char* where) |
| 34 | { |