Skip to content

Fix owned process handle audit regressions#574

Merged
brickfrog merged 2 commits into
feature/owned-process-handlesfrom
feature/owned-process-handles.audit-fixes2-1781309936825-3356972-0
Jun 13, 2026
Merged

Fix owned process handle audit regressions#574
brickfrog merged 2 commits into
feature/owned-process-handlesfrom
feature/owned-process-handles.audit-fixes2-1781309936825-3356972-0

Conversation

@brickfrog

Copy link
Copy Markdown
Owner

What this PR does:

  • Adds pgid_is_alive(pgid) in src/sys using kill(-pgid, 0), treating EPERM as alive and pgid <= 1 as false.
  • Switches recovery liveness to probe the recorded process group rather than the group leader pid.
  • Keeps interpret_kill_agent defaults pure/inert and has dispatch inject real pgroup kill/pidfile deletion.
  • Extends hermetic /tmp native pgroup coverage for leader-exited/descendant-alive.

Audit citations:

Verification:

  • moon test --target native
  • moon build src/bin/choir_lint --target native && _build/native/debug/build/src/bin/choir_lint/choir_lint.exe
  • ! grep -rn "list_pids_with_cwd_prefix|mcp_stdio_pids|read_proc_process_table_entries|process_table_ppid_from_proc_stat|ProcessTableEntry" src/
  • ! grep -rn "choir_list_pids_with_cwd_prefix" src/sys/stub.c

Note: no .choir/audit-receipts directory was present in this leaf worktree, so the audit references cite the PR #573 task contract text.

Verification

Generated by Choir from commands executed in the leaf workspace.

  • moon test --target native
    • exit: 0
    • head: fe1f87f
    • output tail:
Total tests: 2008, passed: 2008, failed: 0.
  • moon build src/bin/choir_lint --target native && _build/native/debug/build/src/bin/choir_lint/choir_lint.exe
    • exit: 0
    • head: fe1f87f
    • output tail:
Finished. moon: no work to do

@brickfrog brickfrog merged commit 1bcc9f3 into feature/owned-process-handles Jun 13, 2026
1 check passed
@brickfrog brickfrog deleted the feature/owned-process-handles.audit-fixes2-1781309936825-3356972-0 branch June 13, 2026 10:45
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