feat(libkernel): implement killpg #4671

Merged
jagrat04 merged 1 commit from upstream-pr/4671 into main 2026-10-12 21:17:33 +00:00
jagrat04 commented 2026-10-12 18:25:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jagrat04 on 2026-10-12T18:25:35Z.


What

Implement killpg (+yoBbbK8cuk) in libkernel:

  • Export killpg_nid_postfix delegating process group signaling to kill_nid_postfix(-pgrp, guest).
  • Reject negative process group IDs with EINVAL (22) as specified in FreeBSD sys_killpg.
  • Add test coverage in GuestKill verifying signaling process groups 0 and self, rejection of negative and non-existent process groups (EINVAL / ESRCH), and invalid signal numbers.

Tested

  • Windows 11 (x86_64), GuestKill test suite: verified killpg_nid_postfix with process groups 0 and self (signal 0 check and signal 15 delivery), rejection of negative process groups with EINVAL, non-existent groups with ESRCH, and invalid signals with EINVAL.
  • python tools/check_conventions.py --base origin/main passed cleanly.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4833417344 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4671). Originally posted by [jagrat04](https://github.com/jagrat04) on 2026-10-12T18:25:35Z. --- ### What Implement `killpg` (`+yoBbbK8cuk`) in `libkernel`: - Export `killpg_nid_postfix` delegating process group signaling to `kill_nid_postfix(-pgrp, guest)`. - Reject negative process group IDs with `EINVAL` (22) as specified in FreeBSD `sys_killpg`. - Add test coverage in `GuestKill` verifying signaling process groups `0` and `self`, rejection of negative and non-existent process groups (`EINVAL` / `ESRCH`), and invalid signal numbers. ### Tested - Windows 11 (x86_64), `GuestKill` test suite: verified `killpg_nid_postfix` with process groups `0` and `self` (signal 0 check and signal 15 delivery), rejection of negative process groups with `EINVAL`, non-existent groups with `ESRCH`, and invalid signals with `EINVAL`. - `python tools/check_conventions.py --base origin/main` passed cleanly. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Unblocks: none - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-12 18:34:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-12T18:34:47Z.


Progress report (e0fad55 → f08dc5e)

📈 System libraries: 87.58% (+0.01%, +1 implemented functions)

✅ 1 implemented
Library Name
libkernel killpg_nid_postfix
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6130298678 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4671#issuecomment-6130298678). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-12T18:34:47Z. --- <!-- progress-report --> ### Progress report (e0fad55 → f08dc5e) 📈 **System libraries**: 87.58% (+0.01%, +1 implemented functions) <details> <summary>✅ 1 implemented</summary> | Library | Name | | - | - | | libkernel | `killpg_nid_postfix` | </details>
adriadam10 commented 2026-10-12 21:14:15 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-12T21:14:15Z.


Checked killpg against FreeBSD's sys_killpg (negative group → EINVAL, otherwise killpg1), the new GuestKill cases (they fail to link without the change) and the debt entry. docs/dev/debt/libkernel.md conflicted with main next to sigaction; I rebased, keeping main's sigaction line and merging the kill, killpg entry. guest_kill passes on the rebased tree; merging once CI is green.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6132718440 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4671#issuecomment-6132718440). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-12T21:14:15Z. --- Checked `killpg` against FreeBSD's `sys_killpg` (negative group → `EINVAL`, otherwise `killpg1`), the new `GuestKill` cases (they fail to link without the change) and the debt entry. `docs/dev/debt/libkernel.md` conflicted with main next to `sigaction`; I rebased, keeping main's `sigaction` line and merging the `kill, killpg` entry. `guest_kill` passes on the rebased tree; merging once CI is green.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!4671
No description provided.