-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for watching processes with IOCP (#73)
These changes add support for receiving events from JobObjects (https://learn.microsoft.com/en-us/windows/win32/procthread/job-objects) in the IOCP backend. This feature is then used to implement an IOCP process watcher. JobObjects are unique with the way they interact with the `OVERLAPPED_ENTRY` result structure - they completely repurpose all the fields to mean different things. This means I fill in the completion result directly before `perform` is called. Let me know if this is an issue, I could rework `perform` to accept the entry itself. Remaining TODOs: - [x] Figure out how to address the race condition that exists if the process exits before `wait` is called - there will be no completion events on the JobObject in this case
- Loading branch information
Showing
3 changed files
with
406 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.