Skip to content

fix: verify Windows process liveness using process handles - #99

Draft
Upper9527 wants to merge 1 commit into
mainfrom
codex/windows-process-liveness
Draft

Upper9527 wants to merge 1 commit into
mainfrom
codex/windows-process-liveness

Conversation

@Upper9527

Copy link
Copy Markdown
Collaborator

Carry forward the focused Windows runtime fix from the author's withdrawn #91. OpenProcess alone reports an exited process alive while another handle retains its kernel object; use pointer-correct ctypes declarations and WaitForSingleObject, and close the handle in finally. Inspection failures remain conservatively alive except a missing PID.

Adds native Windows regression tests and mocked error-path tests. Local macOS run: 7 passed, 4 native cases skipped; Ruff 0.12.2 passes. The prepared Windows CI matrix could not be uploaded because the current token lacks workflow permission. The maintainer chose to defer that authorization; native Windows execution remains a follow-up and is not represented as verified by this PR.

Related to #27: its screenshot specifically shows the older os.kill(pid, 0) implementation, which main has already replaced. This PR adds regression protection and fixes the remaining liveness edge cases, rather than claiming that the screenshot came from this newer implementation.

Original implementation and tests: #91, Rens Tillmann (co-author credit preserved).

Carry forward the withdrawn PR #91 with credit to its author.

Co-authored-by: Rens Tillmann <feeling4design@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant