| 382 | } |
| 383 | |
| 384 | HandlePtr Process::openHandleForWait() const |
| 385 | { |
| 386 | const auto rights = |
| 387 | PROCESS_QUERY_LIMITED_INFORMATION | // exit code, image name, etc. |
| 388 | SYNCHRONIZE | // wait functions |
| 389 | PROCESS_SET_QUOTA | PROCESS_TERMINATE; // add to job |
| 390 | |
| 391 | // don't log errors, failure can happen if the process doesn't exist |
| 392 | return HandlePtr(OpenProcess(rights, FALSE, m_pid)); |
| 393 | } |
| 394 | |
| 395 | // whether this process can be accessed; fails if the current process doesn't |
| 396 | // have the proper permissions |
no outgoing calls
no test coverage detected